using AxSHDocVw;
using cjx.ProxySocket;
using mshtml;
using soft917ecom;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.IO;
using System.IO.Compression;
using System.Management;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Reflection;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using utils;
namespace CopyPP
{
	public class Form1 : Form
	{
		private const int int_0 = 512000;
		private const int int_1 = 40;
		private const int qpCpuvItwG = 1024;
		private MainMenu mainMenu_0;
		private IContainer icontainer_0;
		private TabControl tabCtl;
		private TextBox txtLog;
		private TabPage tabLog;
		private TabPage tabSet;
        private string domain = "www917ecom.gotoip3.com";
		public int wirelesstxtlen;
		public bool bSave;
		private int int_2;
		public string vcinput = "";
		public int prop_type = 1;
		private decimal decimal_0;
		private string string_1 = "";
		private string string_2 = "";
		private int int_3 = 1;
		private int int_4;
		private string string_3 = "";
		private int int_5;
		public string cookiestr = "";
		private int winVersionNum;
		private string winTitle;
		private string winVersion;
		private string helpLink;
		private string[] regString;
		private string[] string_8;
		private WebClient webClient_0 = new WebClient();
		private bool bool_0;
		private bool bool_1;
		private int int_7;
		private bool bStopCurAction;
		public CookieContainer cookie;
		private bool bool_3;
		private Thread thread_0;
        //销售属性图过多出错 
		private int iSellPropAlias;
		private bool bool_4;
		private int int_9;
		private string string_9 = "";
		private string string_10 = "";
		private string string_11 = "";
		private CheckBox ckStart;
		private MenuItem menuItem_0;
		private MenuItem menuItem_1;
		private NotifyIcon notifyIcon_0;
		private ContextMenu contextMenu_0;
		private MenuItem menuItem_2;
		private MenuItem menuItem_3;
		private MenuItem menuItem_4;
		private MenuItem menuItem_5;
		private MenuItem menuItem_6;
		private TabPage tabReg;
		private MenuItem menuItem_7;
		private MenuItem menuItem_8;
		private GroupBox groupBox7;
		private Label label12;
		private Label label13;
		private TextBox txtRegCode;
		private TextBox txtMachineCode;
		private Button btnReg;
		private LinkLabel lnHelp;
		private MenuItem menuItem_9;
		private MainMenu mainMenu_1;
		private TextBox txtAddr;
		private Label label1;
		private Button btnAdd;
		private TreeView tvShops;
		private Button btnClear;
		private Button btnRefresh;
		private DataGrid dgGoods;
		private Button btnView;
		private Button btnSelAll;
		private Button btnSelNo;
		private Button btnSelRes;
		private Button btnExport;
		private MenuItem menuItem_10;
		private MenuItem menuItem_11;
		private MenuItem menuItem_12;
		private MenuItem menuItem_13;
		private MenuItem menuItem_14;
		private MenuItem menuItem_15;
		private MenuItem menuItem_16;
		private CheckBox ckStock;
		private MenuItem menuItem_17;
		private MenuItem menuItem_18;
		private MenuItem menuItem_19;
		private Label lblContact;
		private Label lblHelp;
		private Button btnDelShop;
		private GroupBox groupBox1;
		private TextBox txtKey;
		private TabPage tabPage1;
		private GroupBox groupBox2;
		private Button btnExportSingle;
		private Label label3;
		private TextBox txtGoods;
		private Label label2;
		private CheckBox ckMovePic;
		private CheckBox ckMoveAll;
		private Label label26;
		private TextBox txtCat;
		private Button btnSearchCat;
		private CheckBox ck1page;
		private CheckBox ckMultiPic;
		private CheckBox ckNoSellProp;
		private CheckBox ckSellImg;
		private Label label4;
		private NumericUpDown nPriceAdd;
		private Label label5;
		private CheckBox ckDelHref;
		private CheckBox ckDelOnlyHref;
		private TextBox txtPriceMul;
		private CheckBox ckPP;
		private CheckBox ckNoCopied;
		private Button btnClearCopied;
		private CheckBox ckCompImg;
		private MenuItem menuItem_20;
		private GroupBox groupBox3;
		private Button button1;
		private CheckBox ckMuchSellImg;
		private CheckBox ckLowVer;
		private CheckBox ckOnlyPic;
		private TabPage tabWeb;
		private AxWebBrowser axWebBrowser_0;
		private CheckBox ckLogin;
		private TextBox aliwwUserID;
		private Label label6;
		private TextBox txtPwd;
		private Label label7;
		private CheckBox ckWireless;
		private MenuItem menuItem_21;
		private MenuItem menuItem_22;
		private MenuItem menuItem_23;
		private CheckBox ckNoPromote;
        private IContainer components;
		private StatusBar statusBar1;
		public Form1()
		{
			this.InitializeComponent();
			Control.CheckForIllegalCrossThreadCalls = false;
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.icontainer_0 != null)
			{
				this.icontainer_0.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.mainMenu_0 = new System.Windows.Forms.MainMenu(this.components);
            this.menuItem_5 = new System.Windows.Forms.MenuItem();
            this.menuItem_7 = new System.Windows.Forms.MenuItem();
            this.menuItem_0 = new System.Windows.Forms.MenuItem();
            this.menuItem_18 = new System.Windows.Forms.MenuItem();
            this.menuItem_19 = new System.Windows.Forms.MenuItem();
            this.menuItem_23 = new System.Windows.Forms.MenuItem();
            this.menuItem_22 = new System.Windows.Forms.MenuItem();
            this.menuItem_21 = new System.Windows.Forms.MenuItem();
            this.menuItem_1 = new System.Windows.Forms.MenuItem();
            this.menuItem_17 = new System.Windows.Forms.MenuItem();
            this.menuItem_10 = new System.Windows.Forms.MenuItem();
            this.menuItem_11 = new System.Windows.Forms.MenuItem();
            this.menuItem_12 = new System.Windows.Forms.MenuItem();
            this.menuItem_15 = new System.Windows.Forms.MenuItem();
            this.menuItem_13 = new System.Windows.Forms.MenuItem();
            this.menuItem_14 = new System.Windows.Forms.MenuItem();
            this.menuItem_16 = new System.Windows.Forms.MenuItem();
            this.menuItem_20 = new System.Windows.Forms.MenuItem();
            this.tabCtl = new System.Windows.Forms.TabControl();
            this.tabSet = new System.Windows.Forms.TabPage();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.txtKey = new System.Windows.Forms.TextBox();
            this.btnDelShop = new System.Windows.Forms.Button();
            this.btnExport = new System.Windows.Forms.Button();
            this.btnSelRes = new System.Windows.Forms.Button();
            this.btnSelNo = new System.Windows.Forms.Button();
            this.btnSelAll = new System.Windows.Forms.Button();
            this.btnRefresh = new System.Windows.Forms.Button();
            this.btnView = new System.Windows.Forms.Button();
            this.btnClear = new System.Windows.Forms.Button();
            this.btnAdd = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.txtAddr = new System.Windows.Forms.TextBox();
            this.tvShops = new System.Windows.Forms.TreeView();
            this.dgGoods = new System.Windows.Forms.DataGrid();
            this.tabPage1 = new System.Windows.Forms.TabPage();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.button1 = new System.Windows.Forms.Button();
            this.ck1page = new System.Windows.Forms.CheckBox();
            this.btnSearchCat = new System.Windows.Forms.Button();
            this.txtCat = new System.Windows.Forms.TextBox();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.btnExportSingle = new System.Windows.Forms.Button();
            this.label3 = new System.Windows.Forms.Label();
            this.txtGoods = new System.Windows.Forms.TextBox();
            this.label2 = new System.Windows.Forms.Label();
            this.tabLog = new System.Windows.Forms.TabPage();
            this.txtLog = new System.Windows.Forms.TextBox();
            this.tabReg = new System.Windows.Forms.TabPage();
            this.lblContact = new System.Windows.Forms.Label();
            this.lnHelp = new System.Windows.Forms.LinkLabel();
            this.lblHelp = new System.Windows.Forms.Label();
            this.groupBox7 = new System.Windows.Forms.GroupBox();
            this.label26 = new System.Windows.Forms.Label();
            this.btnReg = new System.Windows.Forms.Button();
            this.txtRegCode = new System.Windows.Forms.TextBox();
            this.txtMachineCode = new System.Windows.Forms.TextBox();
            this.label13 = new System.Windows.Forms.Label();
            this.label12 = new System.Windows.Forms.Label();
            this.tabWeb = new System.Windows.Forms.TabPage();
            this.axWebBrowser_0 = new AxSHDocVw.AxWebBrowser();
            this.ckMoveAll = new System.Windows.Forms.CheckBox();
            this.ckMovePic = new System.Windows.Forms.CheckBox();
            this.ckStock = new System.Windows.Forms.CheckBox();
            this.ckMultiPic = new System.Windows.Forms.CheckBox();
            this.ckStart = new System.Windows.Forms.CheckBox();
            this.notifyIcon_0 = new System.Windows.Forms.NotifyIcon(this.components);
            this.contextMenu_0 = new System.Windows.Forms.ContextMenu();
            this.menuItem_6 = new System.Windows.Forms.MenuItem();
            this.menuItem_3 = new System.Windows.Forms.MenuItem();
            this.menuItem_4 = new System.Windows.Forms.MenuItem();
            this.menuItem_2 = new System.Windows.Forms.MenuItem();
            this.menuItem_8 = new System.Windows.Forms.MenuItem();
            this.menuItem_9 = new System.Windows.Forms.MenuItem();
            this.statusBar1 = new System.Windows.Forms.StatusBar();
            this.mainMenu_1 = new System.Windows.Forms.MainMenu(this.components);
            this.ckNoSellProp = new System.Windows.Forms.CheckBox();
            this.ckSellImg = new System.Windows.Forms.CheckBox();
            this.label4 = new System.Windows.Forms.Label();
            this.nPriceAdd = new System.Windows.Forms.NumericUpDown();
            this.label5 = new System.Windows.Forms.Label();
            this.ckDelHref = new System.Windows.Forms.CheckBox();
            this.ckDelOnlyHref = new System.Windows.Forms.CheckBox();
            this.txtPriceMul = new System.Windows.Forms.TextBox();
            this.ckPP = new System.Windows.Forms.CheckBox();
            this.ckNoCopied = new System.Windows.Forms.CheckBox();
            this.btnClearCopied = new System.Windows.Forms.Button();
            this.ckCompImg = new System.Windows.Forms.CheckBox();
            this.ckMuchSellImg = new System.Windows.Forms.CheckBox();
            this.ckLowVer = new System.Windows.Forms.CheckBox();
            this.ckOnlyPic = new System.Windows.Forms.CheckBox();
            this.ckLogin = new System.Windows.Forms.CheckBox();
            this.aliwwUserID = new System.Windows.Forms.TextBox();
            this.label6 = new System.Windows.Forms.Label();
            this.txtPwd = new System.Windows.Forms.TextBox();
            this.label7 = new System.Windows.Forms.Label();
            this.ckWireless = new System.Windows.Forms.CheckBox();
            this.ckNoPromote = new System.Windows.Forms.CheckBox();
            this.tabCtl.SuspendLayout();
            this.tabSet.SuspendLayout();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgGoods)).BeginInit();
            this.tabPage1.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.tabLog.SuspendLayout();
            this.tabReg.SuspendLayout();
            this.groupBox7.SuspendLayout();
            this.tabWeb.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.axWebBrowser_0)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.nPriceAdd)).BeginInit();
            this.SuspendLayout();
            // 
            // mainMenu_0
            // 
            this.mainMenu_0.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem_5,
            this.menuItem_7,
            this.menuItem_0,
            this.menuItem_18,
            this.menuItem_19,
            this.menuItem_23,
            this.menuItem_22,
            this.menuItem_21,
            this.menuItem_1,
            this.menuItem_17});
            // 
            // menuItem_5
            // 
            this.menuItem_5.Index = 0;
            this.menuItem_5.Text = "日志";
            this.menuItem_5.Click += new System.EventHandler(this.menuItem_5_Click);
            // 
            // menuItem_7
            // 
            this.menuItem_7.Index = 1;
            this.menuItem_7.Text = "软件注册";
            this.menuItem_7.Click += new System.EventHandler(this.menuItem_7_Click);
            // 
            // menuItem_0
            // 
            this.menuItem_0.Index = 2;
            this.menuItem_0.Text = "最小化";
            this.menuItem_0.Click += new System.EventHandler(this.menuItem_0_Click);
            // 
            // menuItem_18
            // 
            this.menuItem_18.Index = 3;
            this.menuItem_18.Text = "停止当前操作";
            this.menuItem_18.Click += new System.EventHandler(this.menuItem_18_Click);
            // 
            // menuItem_19
            // 
            this.menuItem_19.Index = 4;
            this.menuItem_19.Text = "帮助";
            this.menuItem_19.Click += new System.EventHandler(this.menuItem_19_Click);
            // 
            // menuItem_23
            // 
            this.menuItem_23.Index = 5;
            this.menuItem_23.Text = "删除host";
            this.menuItem_23.Click += new System.EventHandler(this.menuItem_23_Click);
            // 
            // menuItem_22
            // 
            this.menuItem_22.Index = 6;
            this.menuItem_22.Text = "添加host";
            this.menuItem_22.Click += new System.EventHandler(this.menuItem_22_Click);
            // 
            // menuItem_21
            // 
            this.menuItem_21.Index = 7;
            this.menuItem_21.Text = "强制升级";
            this.menuItem_21.Click += new System.EventHandler(this.mustUpdateVersion);
            // 
            // menuItem_1
            // 
            this.menuItem_1.Index = 8;
            this.menuItem_1.Text = "退出";
            this.menuItem_1.Click += new System.EventHandler(this.menuItem_1_Click);
            // 
            // menuItem_17
            // 
            this.menuItem_17.Index = 9;
            this.menuItem_17.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem_10,
            this.menuItem_11,
            this.menuItem_12,
            this.menuItem_15,
            this.menuItem_13,
            this.menuItem_14,
            this.menuItem_16,
            this.menuItem_20});
            this.menuItem_17.Text = "资料管理";
            // 
            // menuItem_10
            // 
            this.menuItem_10.Index = 0;
            this.menuItem_10.Text = "1更新一级分类";
            this.menuItem_10.Click += new System.EventHandler(this.menuItem_10_Click);
            // 
            // menuItem_11
            // 
            this.menuItem_11.Index = 1;
            this.menuItem_11.Text = "2重新更新子分类";
            this.menuItem_11.Click += new System.EventHandler(this.menuItem_11_Click);
            // 
            // menuItem_12
            // 
            this.menuItem_12.Index = 2;
            this.menuItem_12.Text = "3继续更新子分类";
            this.menuItem_12.Click += new System.EventHandler(this.menuItem_12_Click);
            // 
            // menuItem_15
            // 
            this.menuItem_15.Index = 3;
            this.menuItem_15.Text = "3错误重置";
            this.menuItem_15.Click += new System.EventHandler(this.menuItem_15_Click);
            // 
            // menuItem_13
            // 
            this.menuItem_13.Index = 4;
            this.menuItem_13.Text = "4清除原有属性";
            this.menuItem_13.Click += new System.EventHandler(this.menuItem_13_Click);
            // 
            // menuItem_14
            // 
            this.menuItem_14.Index = 5;
            this.menuItem_14.Text = "5更新分类属性";
            this.menuItem_14.Click += new System.EventHandler(this.menuItem_14_Click);
            // 
            // menuItem_16
            // 
            this.menuItem_16.Index = 6;
            this.menuItem_16.Text = "5错误重置";
            this.menuItem_16.Click += new System.EventHandler(this.menuItem_16_Click);
            // 
            // menuItem_20
            // 
            this.menuItem_20.Index = 7;
            this.menuItem_20.Text = "下载属性文件";
            this.menuItem_20.Click += new System.EventHandler(this.menuItem_20_Click);
            // 
            // tabCtl
            // 
            this.tabCtl.Controls.Add(this.tabSet);
            this.tabCtl.Controls.Add(this.tabPage1);
            this.tabCtl.Controls.Add(this.tabLog);
            this.tabCtl.Controls.Add(this.tabReg);
            this.tabCtl.Controls.Add(this.tabWeb);
            this.tabCtl.Location = new System.Drawing.Point(0, 0);
            this.tabCtl.Name = "tabCtl";
            this.tabCtl.SelectedIndex = 0;
            this.tabCtl.Size = new System.Drawing.Size(696, 328);
            this.tabCtl.TabIndex = 0;
            this.tabCtl.Click += new System.EventHandler(this.tabCtl_Click);
            // 
            // tabSet
            // 
            this.tabSet.Controls.Add(this.groupBox1);
            this.tabSet.Controls.Add(this.btnDelShop);
            this.tabSet.Controls.Add(this.btnExport);
            this.tabSet.Controls.Add(this.btnSelRes);
            this.tabSet.Controls.Add(this.btnSelNo);
            this.tabSet.Controls.Add(this.btnSelAll);
            this.tabSet.Controls.Add(this.btnRefresh);
            this.tabSet.Controls.Add(this.btnView);
            this.tabSet.Controls.Add(this.btnClear);
            this.tabSet.Controls.Add(this.btnAdd);
            this.tabSet.Controls.Add(this.label1);
            this.tabSet.Controls.Add(this.txtAddr);
            this.tabSet.Controls.Add(this.tvShops);
            this.tabSet.Controls.Add(this.dgGoods);
            this.tabSet.Location = new System.Drawing.Point(4, 22);
            this.tabSet.Name = "tabSet";
            this.tabSet.Size = new System.Drawing.Size(688, 302);
            this.tabSet.TabIndex = 1;
            this.tabSet.Text = "按店铺或分类复制";
            this.tabSet.UseVisualStyleBackColor = true;
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.txtKey);
            this.groupBox1.Location = new System.Drawing.Point(296, 32);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(384, 40);
            this.groupBox1.TabIndex = 20;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "关键词(多个请用逗号\",\"隔开表示:或,内部用空格表示且)";
            // 
            // txtKey
            // 
            this.txtKey.Location = new System.Drawing.Point(8, 14);
            this.txtKey.Name = "txtKey";
            this.txtKey.Size = new System.Drawing.Size(368, 21);
            this.txtKey.TabIndex = 0;
            // 
            // btnDelShop
            // 
            this.btnDelShop.Location = new System.Drawing.Point(224, 104);
            this.btnDelShop.Name = "btnDelShop";
            this.btnDelShop.Size = new System.Drawing.Size(64, 23);
            this.btnDelShop.TabIndex = 19;
            this.btnDelShop.Text = "删除店铺";
            this.btnDelShop.Click += new System.EventHandler(this.btnDelShop_Click);
            // 
            // btnExport
            // 
            this.btnExport.Location = new System.Drawing.Point(224, 273);
            this.btnExport.Name = "btnExport";
            this.btnExport.Size = new System.Drawing.Size(64, 23);
            this.btnExport.TabIndex = 17;
            this.btnExport.Text = "导　出";
            this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
            // 
            // btnSelRes
            // 
            this.btnSelRes.Location = new System.Drawing.Point(224, 216);
            this.btnSelRes.Name = "btnSelRes";
            this.btnSelRes.Size = new System.Drawing.Size(64, 23);
            this.btnSelRes.TabIndex = 16;
            this.btnSelRes.Text = "反　选";
            this.btnSelRes.Click += new System.EventHandler(this.btnSelRes_Click);
            // 
            // btnSelNo
            // 
            this.btnSelNo.Location = new System.Drawing.Point(224, 184);
            this.btnSelNo.Name = "btnSelNo";
            this.btnSelNo.Size = new System.Drawing.Size(64, 23);
            this.btnSelNo.TabIndex = 15;
            this.btnSelNo.Text = "全不选";
            this.btnSelNo.Click += new System.EventHandler(this.btnSelNo_Click);
            // 
            // btnSelAll
            // 
            this.btnSelAll.Location = new System.Drawing.Point(224, 152);
            this.btnSelAll.Name = "btnSelAll";
            this.btnSelAll.Size = new System.Drawing.Size(64, 23);
            this.btnSelAll.TabIndex = 14;
            this.btnSelAll.Text = "全　选";
            this.btnSelAll.Click += new System.EventHandler(this.btnSelAll_Click);
            // 
            // btnRefresh
            // 
            this.btnRefresh.Location = new System.Drawing.Point(224, 72);
            this.btnRefresh.Name = "btnRefresh";
            this.btnRefresh.Size = new System.Drawing.Size(64, 23);
            this.btnRefresh.TabIndex = 12;
            this.btnRefresh.Text = "刷新>>";
            this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click);
            // 
            // btnView
            // 
            this.btnView.Location = new System.Drawing.Point(224, 40);
            this.btnView.Name = "btnView";
            this.btnView.Size = new System.Drawing.Size(64, 23);
            this.btnView.TabIndex = 11;
            this.btnView.Text = "查看>>";
            this.btnView.Click += new System.EventHandler(this.btnView_Click);
            // 
            // btnClear
            // 
            this.btnClear.ForeColor = System.Drawing.Color.Red;
            this.btnClear.Location = new System.Drawing.Point(526, 8);
            this.btnClear.Name = "btnClear";
            this.btnClear.Size = new System.Drawing.Size(114, 23);
            this.btnClear.TabIndex = 10;
            this.btnClear.Text = "清空店铺宝贝数据";
            this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
            // 
            // btnAdd
            // 
            this.btnAdd.Location = new System.Drawing.Point(344, 8);
            this.btnAdd.Name = "btnAdd";
            this.btnAdd.Size = new System.Drawing.Size(56, 23);
            this.btnAdd.TabIndex = 2;
            this.btnAdd.Text = "添　加";
            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(8, 16);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(113, 12);
            this.label1.TabIndex = 1;
            this.label1.Text = "要复制的店铺地址：";
            // 
            // txtAddr
            // 
            this.txtAddr.Location = new System.Drawing.Point(128, 8);
            this.txtAddr.Name = "txtAddr";
            this.txtAddr.Size = new System.Drawing.Size(208, 21);
            this.txtAddr.TabIndex = 0;
            // 
            // tvShops
            // 
            this.tvShops.Location = new System.Drawing.Point(8, 40);
            this.tvShops.Name = "tvShops";
            this.tvShops.Size = new System.Drawing.Size(208, 256);
            this.tvShops.TabIndex = 9;
            // 
            // dgGoods
            // 
            this.dgGoods.CaptionVisible = false;
            this.dgGoods.DataMember = "";
            this.dgGoods.HeaderForeColor = System.Drawing.SystemColors.ControlText;
            this.dgGoods.Location = new System.Drawing.Point(296, 72);
            this.dgGoods.Name = "dgGoods";
            this.dgGoods.Size = new System.Drawing.Size(384, 224);
            this.dgGoods.TabIndex = 13;
            // 
            // tabPage1
            // 
            this.tabPage1.Controls.Add(this.groupBox3);
            this.tabPage1.Controls.Add(this.groupBox2);
            this.tabPage1.Location = new System.Drawing.Point(4, 22);
            this.tabPage1.Name = "tabPage1";
            this.tabPage1.Size = new System.Drawing.Size(688, 302);
            this.tabPage1.TabIndex = 3;
            this.tabPage1.Text = "按商品地址复制/按店铺分类地址复制/按店地址快速提取全店商品复制";
            this.tabPage1.UseVisualStyleBackColor = true;
            // 
            // groupBox3
            // 
            this.groupBox3.Controls.Add(this.button1);
            this.groupBox3.Controls.Add(this.ck1page);
            this.groupBox3.Controls.Add(this.btnSearchCat);
            this.groupBox3.Controls.Add(this.txtCat);
            this.groupBox3.Location = new System.Drawing.Point(12, 11);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(670, 70);
            this.groupBox3.TabIndex = 11;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "按店铺分类地址复制或全店复制：请在下面文本框内输入分类地址或店铺地址";
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(97, 40);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(113, 23);
            this.button1.TabIndex = 7;
            this.button1.Text = "提取全店商品";
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // ck1page
            // 
            this.ck1page.Location = new System.Drawing.Point(16, 39);
            this.ck1page.Name = "ck1page";
            this.ck1page.Size = new System.Drawing.Size(104, 24);
            this.ck1page.TabIndex = 6;
            this.ck1page.Text = "只提取1页";
            // 
            // btnSearchCat
            // 
            this.btnSearchCat.Location = new System.Drawing.Point(216, 40);
            this.btnSearchCat.Name = "btnSearchCat";
            this.btnSearchCat.Size = new System.Drawing.Size(400, 23);
            this.btnSearchCat.TabIndex = 5;
            this.btnSearchCat.Text = "提取上面自定义分类地址里的商品地址到要复制的商品地址列表框里";
            this.btnSearchCat.Click += new System.EventHandler(this.btnSearchCat_Click);
            // 
            // txtCat
            // 
            this.txtCat.Location = new System.Drawing.Point(16, 16);
            this.txtCat.Name = "txtCat";
            this.txtCat.Size = new System.Drawing.Size(648, 21);
            this.txtCat.TabIndex = 4;
            // 
            // groupBox2
            // 
            this.groupBox2.Controls.Add(this.btnExportSingle);
            this.groupBox2.Controls.Add(this.label3);
            this.groupBox2.Controls.Add(this.txtGoods);
            this.groupBox2.Controls.Add(this.label2);
            this.groupBox2.Location = new System.Drawing.Point(12, 90);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(670, 209);
            this.groupBox2.TabIndex = 10;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "按商品地址列表复制";
            // 
            // btnExportSingle
            // 
            this.btnExportSingle.Location = new System.Drawing.Point(13, 181);
            this.btnExportSingle.Name = "btnExportSingle";
            this.btnExportSingle.Size = new System.Drawing.Size(75, 23);
            this.btnExportSingle.TabIndex = 3;
            this.btnExportSingle.Text = "导出商品";
            this.btnExportSingle.Click += new System.EventHandler(this.btnExportSingle_Click);
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.ForeColor = System.Drawing.Color.Red;
            this.label3.Location = new System.Drawing.Point(13, 165);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(143, 12);
            this.label3.TabIndex = 2;
            this.label3.Text = "第2步: 点击下面按钮导出";
            // 
            // txtGoods
            // 
            this.txtGoods.Location = new System.Drawing.Point(13, 36);
            this.txtGoods.MaxLength = 999999999;
            this.txtGoods.Multiline = true;
            this.txtGoods.Name = "txtGoods";
            this.txtGoods.ScrollBars = System.Windows.Forms.ScrollBars.Both;
            this.txtGoods.Size = new System.Drawing.Size(651, 122);
            this.txtGoods.TabIndex = 1;
            this.txtGoods.WordWrap = false;
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.ForeColor = System.Drawing.Color.Red;
            this.label2.Location = new System.Drawing.Point(13, 18);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(347, 12);
            this.label2.TabIndex = 0;
            this.label2.Text = "第1步: 把要复制的商品地址复制到下面文本框里, 每行一个商品";
            // 
            // tabLog
            // 
            this.tabLog.Controls.Add(this.txtLog);
            this.tabLog.Location = new System.Drawing.Point(4, 22);
            this.tabLog.Name = "tabLog";
            this.tabLog.Size = new System.Drawing.Size(688, 302);
            this.tabLog.TabIndex = 0;
            this.tabLog.Text = "日志";
            this.tabLog.UseVisualStyleBackColor = true;
            // 
            // txtLog
            // 
            this.txtLog.BackColor = System.Drawing.Color.White;
            this.txtLog.Location = new System.Drawing.Point(8, 0);
            this.txtLog.Multiline = true;
            this.txtLog.Name = "txtLog";
            this.txtLog.ReadOnly = true;
            this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.txtLog.Size = new System.Drawing.Size(674, 299);
            this.txtLog.TabIndex = 0;
            // 
            // tabReg
            // 
            this.tabReg.Controls.Add(this.lblContact);
            this.tabReg.Controls.Add(this.lnHelp);
            this.tabReg.Controls.Add(this.lblHelp);
            this.tabReg.Controls.Add(this.groupBox7);
            this.tabReg.Location = new System.Drawing.Point(4, 22);
            this.tabReg.Name = "tabReg";
            this.tabReg.Size = new System.Drawing.Size(688, 302);
            this.tabReg.TabIndex = 2;
            this.tabReg.Text = "软件注册";
            this.tabReg.UseVisualStyleBackColor = true;
            // 
            // lblContact
            // 
            this.lblContact.AutoSize = true;
            this.lblContact.ForeColor = System.Drawing.Color.Red;
            this.lblContact.Location = new System.Drawing.Point(16, 240);
            this.lblContact.Name = "lblContact";
            this.lblContact.Size = new System.Drawing.Size(455, 12);
            this.lblContact.TabIndex = 3;
            this.lblContact.Text = "联系方式：　ＱＱ：1020666105 或　91551      E-mail:chenjingxian2008@qq.com ";
            // 
            // lnHelp
            // 
            this.lnHelp.Location = new System.Drawing.Point(200, 216);
            this.lnHelp.Name = "lnHelp";
            this.lnHelp.Size = new System.Drawing.Size(432, 16);
            this.lnHelp.TabIndex = 2;
            this.lnHelp.TabStop = true;
            this.lnHelp.Text = "《拍拍店铺商品宝贝复制专家》";
            this.lnHelp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.KaJudgct7);
            // 
            // lblHelp
            // 
            this.lblHelp.AutoSize = true;
            this.lblHelp.ForeColor = System.Drawing.Color.Red;
            this.lblHelp.Location = new System.Drawing.Point(16, 216);
            this.lblHelp.Name = "lblHelp";
            this.lblHelp.Size = new System.Drawing.Size(173, 12);
            this.lblHelp.TabIndex = 1;
            this.lblHelp.Text = "查看软件介绍和帮助点击这里：";
            // 
            // groupBox7
            // 
            this.groupBox7.Controls.Add(this.label26);
            this.groupBox7.Controls.Add(this.btnReg);
            this.groupBox7.Controls.Add(this.txtRegCode);
            this.groupBox7.Controls.Add(this.txtMachineCode);
            this.groupBox7.Controls.Add(this.label13);
            this.groupBox7.Controls.Add(this.label12);
            this.groupBox7.Location = new System.Drawing.Point(16, 16);
            this.groupBox7.Name = "groupBox7";
            this.groupBox7.Size = new System.Drawing.Size(616, 192);
            this.groupBox7.TabIndex = 0;
            this.groupBox7.TabStop = false;
            this.groupBox7.Text = "注册软件-为保障您电脑与账号的安全,请使用正版软件";
            // 
            // label26
            // 
            this.label26.ForeColor = System.Drawing.Color.Red;
            this.label26.Location = new System.Drawing.Point(88, 96);
            this.label26.Name = "label26";
            this.label26.Size = new System.Drawing.Size(504, 56);
            this.label26.TabIndex = 7;
            this.label26.Text = "友情提醒：在得到注册码后，请务必妥善保存好注册码，最好发到自己邮箱里（给自己发邮件），以免丢失。系统重装后还是用原来的注册码，电脑坏了要换机器码的话也要凭注册码才" +
    "能换。由于顾客太多，我们不可能天天帮你找注册码，若丢失注册码需我们帮忙查找注册码，需付１０元查找费，谢谢合作。";
            // 
            // btnReg
            // 
            this.btnReg.Location = new System.Drawing.Point(232, 160);
            this.btnReg.Name = "btnReg";
            this.btnReg.Size = new System.Drawing.Size(136, 24);
            this.btnReg.TabIndex = 4;
            this.btnReg.Text = "更新注册码";
            this.btnReg.Click += new System.EventHandler(this.btnReg_Click);
            // 
            // txtRegCode
            // 
            this.txtRegCode.Location = new System.Drawing.Point(80, 60);
            this.txtRegCode.Name = "txtRegCode";
            this.txtRegCode.Size = new System.Drawing.Size(504, 21);
            this.txtRegCode.TabIndex = 3;
            // 
            // txtMachineCode
            // 
            this.txtMachineCode.BackColor = System.Drawing.Color.Khaki;
            this.txtMachineCode.Location = new System.Drawing.Point(80, 26);
            this.txtMachineCode.Name = "txtMachineCode";
            this.txtMachineCode.ReadOnly = true;
            this.txtMachineCode.Size = new System.Drawing.Size(504, 21);
            this.txtMachineCode.TabIndex = 2;
            // 
            // label13
            // 
            this.label13.AutoSize = true;
            this.label13.Location = new System.Drawing.Point(32, 64);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(47, 12);
            this.label13.TabIndex = 1;
            this.label13.Text = "注册码:";
            // 
            // label12
            // 
            this.label12.AutoSize = true;
            this.label12.Location = new System.Drawing.Point(32, 32);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(47, 12);
            this.label12.TabIndex = 0;
            this.label12.Text = "机器码:";
            // 
            // tabWeb
            // 
            this.tabWeb.Controls.Add(this.axWebBrowser_0);
            this.tabWeb.Location = new System.Drawing.Point(4, 22);
            this.tabWeb.Name = "tabWeb";
            this.tabWeb.Size = new System.Drawing.Size(688, 302);
            this.tabWeb.TabIndex = 4;
            this.tabWeb.Text = "网页状态";
            this.tabWeb.UseVisualStyleBackColor = true;
            // 
            // axWebBrowser_0
            // 
            this.axWebBrowser_0.Enabled = true;
            this.axWebBrowser_0.Location = new System.Drawing.Point(-250, -100);
            this.axWebBrowser_0.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWebBrowser_0.OcxState")));
            this.axWebBrowser_0.Size = new System.Drawing.Size(932, 424);
            this.axWebBrowser_0.TabIndex = 0;
            // 
            // ckMoveAll
            // 
            this.ckMoveAll.ForeColor = System.Drawing.Color.Red;
            this.ckMoveAll.Location = new System.Drawing.Point(10, 371);
            this.ckMoveAll.Name = "ckMoveAll";
            this.ckMoveAll.Size = new System.Drawing.Size(419, 24);
            this.ckMoveAll.TabIndex = 22;
            this.ckMoveAll.Text = "5.所有图片搬到自己淘宝空间(包括非淘宝空间图片)数据量大不推荐";
            this.ckMoveAll.Click += new System.EventHandler(this.ckMoveAll_Click);
            // 
            // ckMovePic
            // 
            this.ckMovePic.ForeColor = System.Drawing.Color.Red;
            this.ckMovePic.Location = new System.Drawing.Point(10, 352);
            this.ckMovePic.Name = "ckMovePic";
            this.ckMovePic.Size = new System.Drawing.Size(388, 24);
            this.ckMovePic.TabIndex = 21;
            this.ckMovePic.Text = "3.启用图片搬家（如果出现图片盗链提示时请勾选）-会比较慢";
            this.ckMovePic.Click += new System.EventHandler(this.ckMovePic_Click);
            // 
            // ckStock
            // 
            this.ckStock.ForeColor = System.Drawing.Color.Red;
            this.ckStock.Location = new System.Drawing.Point(453, 331);
            this.ckStock.Name = "ckStock";
            this.ckStock.Size = new System.Drawing.Size(82, 28);
            this.ckStock.TabIndex = 18;
            this.ckStock.Text = "2.进仓库";
            this.ckStock.CheckedChanged += new System.EventHandler(this.ckStock_CheckedChanged);
            // 
            // ckMultiPic
            // 
            this.ckMultiPic.ForeColor = System.Drawing.Color.Red;
            this.ckMultiPic.Location = new System.Drawing.Point(10, 333);
            this.ckMultiPic.Name = "ckMultiPic";
            this.ckMultiPic.Size = new System.Drawing.Size(416, 24);
            this.ckMultiPic.TabIndex = 23;
            this.ckMultiPic.Text = "1.启用多主图复制(淘宝空间不够会提示PICTURE_OVER_AVAILSPACE)";
            this.ckMultiPic.Click += new System.EventHandler(this.ckMultiPic_Click);
            // 
            // ckStart
            // 
            this.ckStart.ForeColor = System.Drawing.Color.Red;
            this.ckStart.Location = new System.Drawing.Point(432, 304);
            this.ckStart.Name = "ckStart";
            this.ckStart.Size = new System.Drawing.Size(104, 24);
            this.ckStart.TabIndex = 8;
            this.ckStart.Text = "启动选中帐号";
            this.ckStart.Visible = false;
            // 
            // notifyIcon_0
            // 
            this.notifyIcon_0.ContextMenu = this.contextMenu_0;
            this.notifyIcon_0.Text = "淘宝店铺商品宝贝复制专家";
            this.notifyIcon_0.Visible = true;
            this.notifyIcon_0.Click += new System.EventHandler(this.notifyIcon_0_Click);
            // 
            // contextMenu_0
            // 
            this.contextMenu_0.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem_6,
            this.menuItem_3,
            this.menuItem_4,
            this.menuItem_2,
            this.menuItem_8,
            this.menuItem_9});
            // 
            // menuItem_6
            // 
            this.menuItem_6.Index = 0;
            this.menuItem_6.Text = "查看日志";
            this.menuItem_6.Click += new System.EventHandler(this.menuItem_6_Click);
            // 
            // menuItem_3
            // 
            this.menuItem_3.Index = 1;
            this.menuItem_3.Text = "显示主窗口";
            this.menuItem_3.Click += new System.EventHandler(this.menuItem_3_Click);
            // 
            // menuItem_4
            // 
            this.menuItem_4.Index = 2;
            this.menuItem_4.Text = "最小化到任务托盘";
            this.menuItem_4.Click += new System.EventHandler(this.menuItem_4_Click);
            // 
            // menuItem_2
            // 
            this.menuItem_2.Index = 3;
            this.menuItem_2.Text = "退出软件";
            this.menuItem_2.Click += new System.EventHandler(this.menuItem_2_Click);
            // 
            // menuItem_8
            // 
            this.menuItem_8.Index = 4;
            this.menuItem_8.Text = "软件注册";
            this.menuItem_8.Click += new System.EventHandler(this.menuItem_8_Click);
            // 
            // menuItem_9
            // 
            this.menuItem_9.Index = 5;
            this.menuItem_9.Text = "帮助信息";
            this.menuItem_9.Click += new System.EventHandler(this.menuItem_9_Click);
            // 
            // statusBar1
            // 
            this.statusBar1.Location = new System.Drawing.Point(0, 528);
            this.statusBar1.Name = "statusBar1";
            this.statusBar1.Size = new System.Drawing.Size(698, 22);
            this.statusBar1.TabIndex = 1;
            // 
            // ckNoSellProp
            // 
            this.ckNoSellProp.ForeColor = System.Drawing.Color.Red;
            this.ckNoSellProp.Location = new System.Drawing.Point(453, 351);
            this.ckNoSellProp.Name = "ckNoSellProp";
            this.ckNoSellProp.Size = new System.Drawing.Size(135, 26);
            this.ckNoSellProp.TabIndex = 24;
            this.ckNoSellProp.Text = "6.不下载销售属性";
            this.ckNoSellProp.Click += new System.EventHandler(this.ckNoSellProp_Click);
            // 
            // ckSellImg
            // 
            this.ckSellImg.ForeColor = System.Drawing.Color.Red;
            this.ckSellImg.Location = new System.Drawing.Point(568, 335);
            this.ckSellImg.Name = "ckSellImg";
            this.ckSellImg.Size = new System.Drawing.Size(125, 21);
            this.ckSellImg.TabIndex = 25;
            this.ckSellImg.Text = "4.下载销售属性图";
            this.ckSellImg.Click += new System.EventHandler(this.ckSellImg_Click);
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(8, 510);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(323, 12);
            this.label4.TabIndex = 26;
            this.label4.Text = "商品价格批量调整(正数表示提高价格,负数表示降低价格)：";
            // 
            // nPriceAdd
            // 
            this.nPriceAdd.Location = new System.Drawing.Point(328, 506);
            this.nPriceAdd.Minimum = new decimal(new int[] {
            9999,
            0,
            0,
            -2147483648});
            this.nPriceAdd.Name = "nPriceAdd";
            this.nPriceAdd.Size = new System.Drawing.Size(56, 21);
            this.nPriceAdd.TabIndex = 27;
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(386, 509);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(71, 12);
            this.label5.TabIndex = 28;
            this.label5.Text = "元,然后乘以";
            // 
            // ckDelHref
            // 
            this.ckDelHref.ForeColor = System.Drawing.Color.Red;
            this.ckDelHref.Location = new System.Drawing.Point(453, 375);
            this.ckDelHref.Name = "ckDelHref";
            this.ckDelHref.Size = new System.Drawing.Size(191, 19);
            this.ckDelHref.TabIndex = 29;
            this.ckDelHref.Text = "8.删除描述中的有链接部分";
            this.ckDelHref.CheckedChanged += new System.EventHandler(this.ckDelHref_CheckedChanged);
            this.ckDelHref.Click += new System.EventHandler(this.ckDelHref_Click);
            // 
            // ckDelOnlyHref
            // 
            this.ckDelOnlyHref.ForeColor = System.Drawing.Color.Red;
            this.ckDelOnlyHref.Location = new System.Drawing.Point(10, 394);
            this.ckDelOnlyHref.Name = "ckDelOnlyHref";
            this.ckDelOnlyHref.Size = new System.Drawing.Size(400, 19);
            this.ckDelOnlyHref.TabIndex = 30;
            this.ckDelOnlyHref.Text = "7.删除描述中的链接地址(仅删除链接地址，不删除文字和图片)";
            this.ckDelOnlyHref.CheckedChanged += new System.EventHandler(this.ckDelOnlyHref_CheckedChanged);
            this.ckDelOnlyHref.Click += new System.EventHandler(this.ckDelOnlyHref_Click);
            // 
            // txtPriceMul
            // 
            this.txtPriceMul.Location = new System.Drawing.Point(456, 505);
            this.txtPriceMul.Name = "txtPriceMul";
            this.txtPriceMul.Size = new System.Drawing.Size(27, 21);
            this.txtPriceMul.TabIndex = 31;
            this.txtPriceMul.Text = "1";
            // 
            // ckPP
            // 
            this.ckPP.ForeColor = System.Drawing.Color.Red;
            this.ckPP.Location = new System.Drawing.Point(10, 416);
            this.ckPP.Name = "ckPP";
            this.ckPP.Size = new System.Drawing.Size(642, 19);
            this.ckPP.TabIndex = 32;
            this.ckPP.Text = "9.导出拍拍CSV格式-注:勾上后不能导入淘宝助理(且有主图和描述,无属性)";
            this.ckPP.Click += new System.EventHandler(this.ckPP_Click);
            // 
            // ckNoCopied
            // 
            this.ckNoCopied.ForeColor = System.Drawing.Color.Red;
            this.ckNoCopied.Location = new System.Drawing.Point(10, 437);
            this.ckNoCopied.Name = "ckNoCopied";
            this.ckNoCopied.Size = new System.Drawing.Size(349, 20);
            this.ckNoCopied.TabIndex = 33;
            this.ckNoCopied.Text = "10.若在“已复制过的列表”中则跳过";
            this.ckNoCopied.Click += new System.EventHandler(this.ckNoCopied_Click);
            // 
            // btnClearCopied
            // 
            this.btnClearCopied.ForeColor = System.Drawing.Color.Green;
            this.btnClearCopied.Location = new System.Drawing.Point(241, 435);
            this.btnClearCopied.Name = "btnClearCopied";
            this.btnClearCopied.Size = new System.Drawing.Size(186, 23);
            this.btnClearCopied.TabIndex = 34;
            this.btnClearCopied.Text = "清空“已复制过的商品地址列表”";
            this.btnClearCopied.Click += new System.EventHandler(this.btnClearCopied_Click);
            // 
            // ckCompImg
            // 
            this.ckCompImg.ForeColor = System.Drawing.Color.Red;
            this.ckCompImg.Location = new System.Drawing.Point(453, 397);
            this.ckCompImg.Name = "ckCompImg";
            this.ckCompImg.Size = new System.Drawing.Size(199, 19);
            this.ckCompImg.TabIndex = 35;
            this.ckCompImg.Text = "11.启用图片压缩（防图片过大)";
            this.ckCompImg.Click += new System.EventHandler(this.ckCompImg_Click);
            // 
            // ckMuchSellImg
            // 
            this.ckMuchSellImg.ForeColor = System.Drawing.Color.Red;
            this.ckMuchSellImg.Location = new System.Drawing.Point(453, 418);
            this.ckMuchSellImg.Name = "ckMuchSellImg";
            this.ckMuchSellImg.Size = new System.Drawing.Size(156, 19);
            this.ckMuchSellImg.TabIndex = 36;
            this.ckMuchSellImg.Text = "12.销售属性图过多出错";
            this.ckMuchSellImg.Click += new System.EventHandler(this.ckMuchSellImg_Click);
            // 
            // ckLowVer
            // 
            this.ckLowVer.ForeColor = System.Drawing.Color.Red;
            this.ckLowVer.Location = new System.Drawing.Point(453, 438);
            this.ckLowVer.Name = "ckLowVer";
            this.ckLowVer.Size = new System.Drawing.Size(172, 19);
            this.ckLowVer.TabIndex = 37;
            this.ckLowVer.Text = "13.导出低于5.5助理格式";
            this.ckLowVer.Click += new System.EventHandler(this.ckLowVer_Click);
            // 
            // ckOnlyPic
            // 
            this.ckOnlyPic.ForeColor = System.Drawing.Color.Red;
            this.ckOnlyPic.Location = new System.Drawing.Point(453, 460);
            this.ckOnlyPic.Name = "ckOnlyPic";
            this.ckOnlyPic.Size = new System.Drawing.Size(175, 19);
            this.ckOnlyPic.TabIndex = 38;
            this.ckOnlyPic.Text = "14.只想下载图其它不要";
            // 
            // ckLogin
            // 
            this.ckLogin.ForeColor = System.Drawing.Color.Red;
            this.ckLogin.Location = new System.Drawing.Point(10, 484);
            this.ckLogin.Name = "ckLogin";
            this.ckLogin.Size = new System.Drawing.Size(374, 19);
            this.ckLogin.TabIndex = 39;
            this.ckLogin.Text = "15.登录模式（读不到分类或宝贝请勾上并在右边输旺旺和密码）";
            this.ckLogin.Click += new System.EventHandler(this.ckLogin_Click);
            // 
            // aliwwUserID
            // 
            this.aliwwUserID.Location = new System.Drawing.Point(408, 482);
            this.aliwwUserID.Name = "aliwwUserID";
            this.aliwwUserID.Size = new System.Drawing.Size(127, 21);
            this.aliwwUserID.TabIndex = 40;
            this.aliwwUserID.KeyUp += new System.Windows.Forms.KeyEventHandler(this.wcMhojVndc_KeyUp);
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(369, 486);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(41, 12);
            this.label6.TabIndex = 41;
            this.label6.Text = "旺旺：";
            // 
            // txtPwd
            // 
            this.txtPwd.Location = new System.Drawing.Point(581, 484);
            this.txtPwd.Name = "txtPwd";
            this.txtPwd.PasswordChar = '*';
            this.txtPwd.Size = new System.Drawing.Size(83, 21);
            this.txtPwd.TabIndex = 42;
            this.txtPwd.KeyUp += new System.Windows.Forms.KeyEventHandler(this.txtPwd_KeyUp);
            // 
            // label7
            // 
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(542, 488);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(41, 12);
            this.label7.TabIndex = 43;
            this.label7.Text = "密码：";
            // 
            // ckWireless
            // 
            this.ckWireless.ForeColor = System.Drawing.Color.Blue;
            this.ckWireless.Location = new System.Drawing.Point(10, 460);
            this.ckWireless.Name = "ckWireless";
            this.ckWireless.Size = new System.Drawing.Size(264, 19);
            this.ckWireless.TabIndex = 44;
            this.ckWireless.Text = "16.同时生成手机端宝贝详情（无线详情）";
            this.ckWireless.Click += new System.EventHandler(this.ckWireless_Click);
            // 
            // ckNoPromote
            // 
            this.ckNoPromote.ForeColor = System.Drawing.Color.Red;
            this.ckNoPromote.Location = new System.Drawing.Point(489, 507);
            this.ckNoPromote.Name = "ckNoPromote";
            this.ckNoPromote.Size = new System.Drawing.Size(123, 18);
            this.ckNoPromote.TabIndex = 45;
            this.ckNoPromote.Text = "17.不复制促销价";
            this.ckNoPromote.Click += new System.EventHandler(this.ckNoPromote_Click);
            // 
            // Form1
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
            this.ClientSize = new System.Drawing.Size(698, 550);
            this.Controls.Add(this.ckNoPromote);
            this.Controls.Add(this.ckWireless);
            this.Controls.Add(this.txtPwd);
            this.Controls.Add(this.label7);
            this.Controls.Add(this.aliwwUserID);
            this.Controls.Add(this.ckOnlyPic);
            this.Controls.Add(this.ckMuchSellImg);
            this.Controls.Add(this.ckCompImg);
            this.Controls.Add(this.btnClearCopied);
            this.Controls.Add(this.ckNoCopied);
            this.Controls.Add(this.txtPriceMul);
            this.Controls.Add(this.ckDelOnlyHref);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.nPriceAdd);
            this.Controls.Add(this.ckLowVer);
            this.Controls.Add(this.ckSellImg);
            this.Controls.Add(this.ckNoSellProp);
            this.Controls.Add(this.statusBar1);
            this.Controls.Add(this.ckMoveAll);
            this.Controls.Add(this.tabCtl);
            this.Controls.Add(this.ckStart);
            this.Controls.Add(this.ckMovePic);
            this.Controls.Add(this.ckStock);
            this.Controls.Add(this.ckMultiPic);
            this.Controls.Add(this.ckDelHref);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.ckPP);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.ckLogin);
            this.MaximizeBox = false;
            this.Menu = this.mainMenu_0;
            this.Name = "Form1";
            this.Text = "淘宝店铺商品宝贝复制专家";
            this.Activated += new System.EventHandler(this.Form1_Activated);
            this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
            this.Load += new System.EventHandler(this.Form1_Load);
            this.Click += new System.EventHandler(this.Form1_Click);
            this.Resize += new System.EventHandler(this.Form1_Resize);
            this.Validated += new System.EventHandler(this.Form1_Validated);
            this.tabCtl.ResumeLayout(false);
            this.tabSet.ResumeLayout(false);
            this.tabSet.PerformLayout();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgGoods)).EndInit();
            this.tabPage1.ResumeLayout(false);
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.tabLog.ResumeLayout(false);
            this.tabLog.PerformLayout();
            this.tabReg.ResumeLayout(false);
            this.tabReg.PerformLayout();
            this.groupBox7.ResumeLayout(false);
            this.groupBox7.PerformLayout();
            this.tabWeb.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.axWebBrowser_0)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.nPriceAdd)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		[STAThread]
		private static void Main()
		{
			Application.Run(new Form1());
		}
		private void method_0(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabLog;
		}
		public static string GetDiskVolumeSerialNumber()
		{
			return "--" + Form1.GetMD5(Form1.smethod_0() + Form1.GetDiskID(), "");
		}
		public static string GetDiskID()
		{
			string result;
			try
			{
				string text = "";
				ManagementClass managementClass = new ManagementClass("Win32_DiskDrive");
				ManagementObjectCollection instances = managementClass.GetInstances();
				using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = instances.GetEnumerator())
				{
					while (enumerator.MoveNext())
					{
						ManagementObject managementObject = (ManagementObject)enumerator.Current;
						string text2 = (string)managementObject.Properties["Model"].Value;
						if (text2.IndexOf("USB") < 0)
						{
							text = text2;
							break;
						}
					}
				}
				result = text;
			}
			catch
			{
				result = "unknow";
			}
			return result;
		}
		public string GetCpuID()
		{
			string result;
			try
			{
				ManagementClass managementClass = new ManagementClass("Win32_Processor");
				ManagementObjectCollection instances = managementClass.GetInstances();
				string text = null;
				using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = instances.GetEnumerator())
				{
					if (enumerator.MoveNext())
					{
						ManagementObject managementObject = (ManagementObject)enumerator.Current;
						text = managementObject.Properties["ProcessorId"].Value.ToString();
					}
				}
				result = text;
			}
			catch
			{
				result = "";
			}
			return result;
		}
		private static string smethod_0()
		{
			string result;
			try
			{
				ManagementClass managementClass = new ManagementClass("WIN32_BaseBoard");
				ManagementObjectCollection instances = managementClass.GetInstances();
				string text = "";
				using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = instances.GetEnumerator())
				{
					if (enumerator.MoveNext())
					{
						ManagementObject managementObject = (ManagementObject)enumerator.Current;
						text = managementObject["SerialNumber"].ToString();
					}
				}
				result = text;
			}
			catch (Exception)
			{
				result = "www.917e.com";
			}
			return result;
		}
		public static string GetMD5(string sDataIn, string move)
		{
			MD5CryptoServiceProvider mD5CryptoServiceProvider = new MD5CryptoServiceProvider();
			byte[] bytes = Encoding.UTF8.GetBytes(move + sDataIn);
			byte[] array = mD5CryptoServiceProvider.ComputeHash(bytes);
			mD5CryptoServiceProvider.Clear();
			string text = "";
			for (int i = 0; i < array.Length; i++)
			{
				text += array[i].ToString("X").PadLeft(2, '0');
			}
			return text;
		}
		public static string DiskDrive()
		{
			string text = "";
			try
			{
				ManagementObjectSearcher managementObjectSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
				ManagementObjectCollection managementObjectCollection = managementObjectSearcher.Get();
				using (ManagementObjectCollection.ManagementObjectEnumerator enumerator = managementObjectCollection.GetEnumerator())
				{
					if (enumerator.MoveNext())
					{
						ManagementObject managementObject = (ManagementObject)enumerator.Current;
						text += managementObject["PNPDeviceID"].ToString().Trim();
					}
				}
			}
			catch
			{
			}
			return text;
		}
		private void method_1()
		{
			string machineCode = this.GetCpuID();
			machineCode += Form1.GetDiskVolumeSerialNumber();
            //
			this.regString[0] = machineCode;
			this.txtMachineCode.Text = machineCode;
			DataBase dataBase = new DataBase();
			OleDbCommand cmd = new OleDbCommand("select [value] from var where [name]='reg_code'");
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(cmd);
			if (oleDbDataReader.Read())
			{
				this.regString[1] = (oleDbDataReader.IsDBNull(0) ? "" : oleDbDataReader.GetString(0));
				this.txtRegCode.Text = this.regString[1];
			}
			oleDbDataReader.Close();
			dataBase.Close();
			Random random = new Random();
			this.regString[2] = random.Next(1, 100).ToString();
			this.regString[3] = random.Next(1, 100).ToString();
			this.regString[4] = random.Next(1, 100).ToString();
			this.regString[5] = "0";
			this.regString[6] = ((this.regString[1].Length > 1) ? "1" : "0");
		}
		private void verifyRegCode()
		{
			if (this.regString[6].Equals("0")) 
			{
				this.Text = this.winTitle + "[未注册]";
				this.WriteLog("验证注册码失败，请确认注册码是否正确以及网络是否正常", 1);
				return;
			}
			if (this.regString[6].Equals("1")) //来自btnReg点击
			{
				this.Text = this.winTitle + "[正在验证注册信息]";
				return;
			}
			if (!this.regString[6].Equals("2"))
			{
				if (this.regString[6].Equals("3"))
				{
                    this.Text = this.winTitle + "[已注册]";
					if (this.int_7 == 0)
					{
                        this.WriteLog("验证注册信息成功", 1);
						this.int_7++;
					}
				}
				return;
			}
			if (this.regString[5].Equals("-2"))
			{
                this.Text = this.winTitle + "[注册信息被锁-请联系管理员]";
				this.WriteLog("机器码被锁，请联系管理员核实原因", 1);
				return;
			}
            this.Text = this.winTitle + "[未注册]";
            this.WriteLog("验证注册码失败，请确认注册码是否正确以及网络是否正常", 1);
		}
		private void method_3()
		{
			this.winTitle = "淘宝店铺宝贝复制专家[开店必备系列-千鱼软件www.917e.com]";
			this.helpLink = "http://www.917e.com/soft/2.htm";
			if (File.Exists("agent.mdb"))
			{
                DataBase dataBase = new DataBase("agent.mdb", "soft.917e.com");
				OleDbCommand oleDbCommand = new OleDbCommand();
				oleDbCommand.CommandText = "select 软件标题,是否显示软件帮助,软件帮助网址,联系信息 from 代理商信息";
				dataBase.Open();
				OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
				if (oleDbDataReader.Read())
				{
					this.winTitle = oleDbDataReader.GetString(0) + this.winVersion;
					if (oleDbDataReader.GetInt32(1) == 0)
					{
						this.lblHelp.Visible = false;
						this.lnHelp.Visible = false;
						this.menuItem_19.Visible = false;
						this.menuItem_9.Visible = false;
					}
					this.lnHelp.Text = oleDbDataReader.GetString(0);
					this.helpLink = oleDbDataReader.GetString(2);
					this.lblContact.Text = oleDbDataReader.GetString(3);
				}
				oleDbDataReader.Close();
				dataBase.Close();
				return;
			}
			MessageBox.Show("找不到文件agent.mdb，该文件是必须配置文件");
			this.ExitApp();
			base.Dispose();
		}
        //升级
		private void MustUpdateVersion()
		{
			if (File.Exists("update.exe"))
			{
				try
				{
					File.Delete("update.exe");
				}
				catch (Exception)
				{
				}
			}
			this.WriteLog("正在检查版本状态" + this.GetSystemBit().ToString() + "w8" + this.isWin8().ToString(), 1);
			this.int_5 = 90902;
			DataBase dataBase = new DataBase("ver.mdb");
			OleDbCommand oleDbCommand = new OleDbCommand("select soft_id,[version],soft_name from ver");
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
			int softid = 0;
			int version = 0;
			string str = "";
			if (oleDbDataReader.Read())
			{
				softid = oleDbDataReader.GetInt32(0);
				version = oleDbDataReader.GetInt32(1);
				this.winVersionNum = version;
				this.winVersion = version.ToString();
				this.winVersion = "V" + this.winVersion.Insert(this.winVersion.Length - 1, ".");
				str = oleDbDataReader.GetString(2);
			}
			oleDbDataReader.Close();
			dataBase.Close();
			this.int_5 = 90903;
			if (version <= 75)
			{
				try
				{
					DataBase dataBase2 = new DataBase();
					OleDbCommand oleDbCommand2 = new OleDbCommand("select count(*) from ppoption where cid='50012090' and pid='7001498'");
					int num3 = 0;
					dataBase2.Open();
					OleDbDataReader oleDbDataReader2 = dataBase2.ExecuteCmd4Reader(oleDbCommand2);
					if (oleDbDataReader2.Read())
					{
						num3 = oleDbDataReader2.GetInt32(0);
					}
					oleDbDataReader2.Close();
					dataBase2.Close();
					if (num3 == 0)
					{
						this.WriteLog("开始更新属性，请稍等", 1);
						oleDbCommand.CommandText = "delete from ppoption where cid='50012090'";
						dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
						oleDbCommand2.CommandText = "update ppcat set [flag]=1 where cid='50012090'";
						dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
						this.method_71();
					}
					goto IL_1D5;
				}
				catch (Exception ex)
				{
					this.WriteLog("76" + ex.Message, 1);
					goto IL_1D5;
				}
			}
			if (version < 70)
			{
				this.method_69();
			}
			else
			{
				if (version < 71)
				{
					try
					{
						this.method_70();
					}
					catch (Exception)
					{
					}
				}
			}
			IL_1D5:
			this.int_5 = 90904;
			this.domain = "www917ecom.gotoip3.com";
			StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\update.txt", false, Encoding.Default);
			streamWriter.Write(string.Concat(new object[]
			{
				"http://",
				this.domain,
				"/soft/ver.php?sid=",
				softid,
				"&ver=",
				version
			}));
			streamWriter.Close();
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string.Concat(new object[]
			{
				"http://",
				this.domain,
				"/soft/ver.php?sid=",
				softid,
				"&ver=",
				version
			}));
			this.int_5 = 90905;
			httpWebRequest.KeepAlive = false;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string text = streamReader.ReadToEnd();
			streamWriter = new StreamWriter(Application.StartupPath + "\\update.txt", true, Encoding.Default);
			streamWriter.Write(text);
			streamWriter.Close();
			streamReader.Close();
			this.int_5 = 90906;
			text = text.Substring(text.IndexOf("rno=") + 4);
			int num4 = int.Parse(text.Substring(0, text.IndexOf(";")));
			if (num4 == 0)
			{
				this.WriteLog("检查版本状态出错：" + num4.ToString(), 1);
				return;
			}
			this.int_5 = 90906;
			text = text.Substring(text.IndexOf("ver=") + 4);
			string text2 = text.Substring(0, text.IndexOf(";"));
			text = text.Substring(text.IndexOf("upd=") + 4);
			string address = text.Substring(0, text.IndexOf(";"));
			MessageBox.Show(str + " 检测到有新版本[" + text2 + "]，需要升级才能使用,点击确定进行升级(点确定后请等３０秒～２分钟，最新版下载完成后会自动运行，升有期间请不要再次运行本软件)");
			oleDbCommand.CommandText = "update ver set new_ver=" + text2;
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			WebClient webClient = new WebClient();
			webClient.DownloadFile(address, "update.exe");
			Thread.Sleep(1000);
			Process.Start("update.exe");
			this.bStopCurAction = true;
			this.ExitApp();
		}

        /// <summary>
        /// 检查更新
        /// </summary>
		private void UpdateVersion()
		{ 
			if (File.Exists("update.exe"))
			{
				try
				{
					File.Delete("update.exe");
				}
				catch (Exception)
				{
				}
			}
			this.WriteLog("正在检查版本状态" + this.GetSystemBit().ToString() + "w8" + this.isWin8().ToString(), 1);
			this.int_5 = 90902;
			DataBase dataBase = new DataBase("ver.mdb");
			OleDbCommand oleDbCommand = new OleDbCommand("select soft_id,[version],soft_name from ver");
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
			int softId = 0;
			int version = 0;
			string softName = "";
			if (oleDbDataReader.Read())
			{
				softId = oleDbDataReader.GetInt32(0);
				version = oleDbDataReader.GetInt32(1);
				this.winVersionNum = version;
				this.winVersion = version.ToString();
				this.winVersion = "V" + this.winVersion.Insert(this.winVersion.Length - 1, ".");
				softName = oleDbDataReader.GetString(2);
			}
			oleDbDataReader.Close();
			dataBase.Close();
			this.int_5 = 90903;
			if (version <= 75)   //如果版本小于75
			{
				try
				{
					DataBase dataBase2 = new DataBase();
					OleDbCommand oleDbCommand2 = new OleDbCommand("select count(*) from ppoption where cid='50012090' and pid='7001498'");
					int num3 = 0;
					dataBase2.Open();
					OleDbDataReader oleDbDataReader2 = dataBase2.ExecuteCmd4Reader(oleDbCommand2);
					if (oleDbDataReader2.Read())
					{
						num3 = oleDbDataReader2.GetInt32(0);
					}
					oleDbDataReader2.Close();
					dataBase2.Close();
					if (num3 == 0)
					{
						this.WriteLog("开始更新属性，请稍等", 1);
						oleDbCommand.CommandText = "delete from ppoption where cid='50012090'";
						dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
						oleDbCommand2.CommandText = "update ppcat set [flag]=1 where cid='50012090'";
						dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
						this.method_71();
					}
					goto IL_1D5;
				}
				catch (Exception ex)
				{
					this.WriteLog("76" + ex.Message, 1);
					goto IL_1D5;
				}
			}
			if (version < 70)
			{
				this.method_69();
			}
			else
			{
				if (version < 71)
				{
					try
					{
						this.method_70();
					}
					catch (Exception)
					{
					}
				}
			}
			IL_1D5:
			this.int_5 = 90904;
			StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\update.txt", false, Encoding.Default);
			streamWriter.Write(string.Concat(new object[]
			{
				"http://",
				this.domain,
				"/soft/ver.php?sid=",
				softId,
				"&ver=",
				version
			}));
			streamWriter.Close();
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string.Concat(new object[]
			{
				"http://",
				this.domain,
				"/soft/ver.php?sid=",
				softId,
				"&ver=",
				version
			}));
			httpWebRequest.CookieContainer = this.cookie;
			httpWebRequest.AllowAutoRedirect = true;
			httpWebRequest.MaximumAutomaticRedirections = 10;
			this.int_5 = 90905;
			httpWebRequest.KeepAlive = true;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string text = streamReader.ReadToEnd();
			this.cookie.Add(httpWebResponse.Cookies);
			streamWriter = new StreamWriter(Application.StartupPath + "\\update.txt", true, Encoding.Default);
			streamWriter.Write(text);
			streamWriter.Close();
			streamReader.Close();
			this.int_5 = 90906;
			text = text.Substring(text.IndexOf("rno=") + 4);
			this.int_5 = 90907;
			int num4 = int.Parse(text.Substring(0, text.IndexOf(";")));
			this.int_5 = 90908;
			if (num4 == 0)
			{
				this.WriteLog("检查版本状态出错：" + num4.ToString(), 1);
				return;
			}
			if (num4 == 1)
			{
				this.WriteLog("当前版本已是最新版", 1);
				return;
			}
			this.int_5 = 90906;
			text = text.Substring(text.IndexOf("ver=") + 4);
			string text2 = text.Substring(0, text.IndexOf(";"));
			text = text.Substring(text.IndexOf("upd=") + 4);
			string address = text.Substring(0, text.IndexOf(";"));
			MessageBox.Show(softName + " 检测到有新版本[" + text2 + "]，需要升级才能使用,点击确定进行升级(点确定后请等３０秒～２分钟，最新版下载完成后会自动运行，升有期间请不要再次运行本软件)");
			oleDbCommand.CommandText = "update ver set new_ver=" + text2;
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			WebClient webClient = new WebClient();
			webClient.DownloadFile(address, "update.exe");
			Thread.Sleep(1000);
			Process.Start("update.exe");
			this.bStopCurAction = true;
			this.ExitApp();
		}
        //取得系统位数
		public int GetSystemBit()
		{
			if (IntPtr.Size == 8)
			{
				return 64;
			}
			return 32;
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			this.cookie = new CookieContainer();
			this.bool_3 = false;
			this.axWebBrowser_0.Silent = true;
			this.int_4 = int.Parse("2");
			if (!this.NeedVerifyRegCode())
			{
				try
				{
					this.int_5 = 90901;
					this.UpdateVersion();
				}
				catch (Exception ex)
				{
					this.WriteLog(this.int_5 + ":" + ex.Message, 1);
				}
			}
			this.bStopCurAction = false;
			this.int_7 = 0;
			this.bool_1 = false;
			this.regString = new string[10];
			this.string_2 = DateTime.Now.Ticks.ToString();
			if (File.Exists("NoPromote.ini"))
			{
				this.ckNoPromote.Checked = true;
			}
			else
			{
				this.ckNoPromote.Checked = false;
			}
			if (File.Exists("MovePic.ini"))
			{
				this.ckMovePic.Checked = true;
			}
			else
			{
				this.ckMovePic.Checked = false;
			}
			if (File.Exists("wireless.ini"))
			{
				this.ckWireless.Checked = true;
			}
			else
			{
				this.ckWireless.Checked = false;
			}
			if (File.Exists("MoveAll.ini"))
			{
				this.ckMoveAll.Checked = true;
			}
			else
			{
				this.ckMoveAll.Checked = false;
			}
			if (File.Exists("MultiPic.ini"))
			{
				this.ckMultiPic.Checked = true;
			}
			else
			{
				this.ckMultiPic.Checked = false;
			}
			if (File.Exists("NoSellProp.ini"))
			{
				this.ckNoSellProp.Checked = true;
			}
			else
			{
				this.ckNoSellProp.Checked = false;
			}
			if (File.Exists("SellImg.ini"))
			{
				this.ckSellImg.Checked = true;
			}
			else
			{
				this.ckSellImg.Checked = false;
			}
			if (File.Exists("DelHref.ini"))
			{
				this.ckDelHref.Checked = true;
			}
			else
			{
				this.ckDelHref.Checked = false;
			}
			if (File.Exists("DelOnlyHref.ini"))
			{
				this.ckDelOnlyHref.Checked = true;
			}
			else
			{
				this.ckDelOnlyHref.Checked = false;
			}
			if (File.Exists("PPCSV.ini"))
			{
				this.ckPP.Checked = true;
			}
			else
			{
				this.ckPP.Checked = false;
			}
			if (File.Exists("NoCopied.ini"))
			{
				this.ckNoCopied.Checked = true;
			}
			else
			{
				this.ckNoCopied.Checked = false;
			}
			if (!File.Exists("NoCompImg.ini"))
			{
				this.ckCompImg.Checked = true;
			}
			else
			{
				this.ckCompImg.Checked = false;
			}
			if (File.Exists("MuchSellImg.ini"))
			{
				this.ckMuchSellImg.Checked = true;
			}
			else
			{
				this.ckMuchSellImg.Checked = false;
			}
			if (File.Exists("LowVer.ini"))
			{
				this.ckLowVer.Checked = true;
			}
			else
			{
				this.ckLowVer.Checked = false;
			}
			if (File.Exists("SellPropAlias.ini"))
			{
				try
				{
					StreamReader streamReader = new StreamReader("SellPropAlias.ini");
					string s = streamReader.ReadLine().Trim();
					this.iSellPropAlias = int.Parse(s);
				}
				catch (Exception)
				{
				}
			}
			if (this.ckMuchSellImg.Checked)
			{
				this.iSellPropAlias = 15;
			}
			else
			{
				this.iSellPropAlias = 300;
			}
			if (File.Exists("HighPic.ini"))
			{
				this.bool_4 = true;
			}
			else
			{
				this.bool_4 = false;
			}
			this.method_3();
			this.regString[7] = "5";
			this.regString[8] = "5";
			this.regString[9] = "5";
			this.method_1();
			this.verifyRegCode();
			if (this.txtMachineCode.Text.Equals("BFEBFBFF00020655--2C8F014B76BD458525CB30217E4CA314"))
			{
				this.menuItem_17.Visible = true;
			}
			else
			{
				this.menuItem_17.Visible = false;
			}
			if (this.NeedVerifyRegCode())
			{
				this.regString[6] = "3";
				this.verifyRegCode();
			}
			else
			{
				try
				{
					if (this.regString[1].Length > 1)
					{
                        this.WriteLog("进行注册信息验证", 101);
						this.method_25();
					}
				}
				catch (Exception)
				{
                    this.WriteLog("验证注册信息时出现错误，请确认网络是否正常", 101);
				}
			}
			this.dlkshdWy2();
			if (!this.txtMachineCode.Equals("BFEBFBFF000006FD--090995A318299B56E24410CDE5ACE657"))
			{
				this.thread_0 = new Thread(new ThreadStart(this.method_8));
				this.thread_0.Priority = ThreadPriority.Lowest;
				this.thread_0.Start();
			}
			this.method_93();
			if (this.txtRegCode.Text.Trim().Length < 3)
			{
				this.tabCtl.SelectedTab = this.tabReg;
			}
			this.cookie = new CookieContainer();
		}
		private void method_6(object object_0, DWebBrowserEvents2_NewWindow2Event dwebBrowserEvents2_NewWindow2Event_0)
		{
			dwebBrowserEvents2_NewWindow2Event_0.cancel = false;
		}
        /// <summary>
        /// 判断是否需要验证注册码
        /// </summary>
        /// <returns></returns>
		private bool NeedVerifyRegCode()
		{
			string text = this.GetCpuID() + Form1.GetDiskVolumeSerialNumber();
            if (this.txtRegCode.Text.Trim().Equals("20110726153681011EE2975CE55F85208A027FA2BEA53001") && text.Equals("BFEBFBFF000006F6--28AAE18725551CBB267E67110F9BD6AD"))
			{
				this.regString[6] = "3";
				this.bool_1 = true;
				return true;
			}
			if (this.txtRegCode.Text.Trim().Equals("2011072213113BAA093033A9E883DE1F19CA8B5CA8D03001") && text.Equals("178BFBFF00040F33--49E37EDAE845B5B6C5778165CF31E0A4"))
			{
				this.regString[6] = "3";
				this.bool_1 = true;
				return true;
			}
			return false;
		}
		private void method_8()
		{
			double num = 1200.0;
			TimeSpan ts = new TimeSpan(DateTime.Now.Ticks);
			try
			{
				while (true)
				{
					IL_1F:
					TimeSpan timeSpan = new TimeSpan(DateTime.Now.Ticks);
					TimeSpan timeSpan2 = timeSpan.Subtract(ts).Duration();
                    if (this.bSave && timeSpan2.TotalSeconds > num && (this.VerifyRegCode() || this.Text.IndexOf("已注册") >= 0 || this.Text.IndexOf("注册") < 0))
					{
						ts = new TimeSpan(DateTime.Now.Ticks);
						this.method_10();
						string text = this.method_13(string.Concat(new string[]
						{
							"http://",
							this.domain,
							"/soft/rands.php?sid=",
							this.int_4.ToString(),
							"&rc=",
							this.txtRegCode.Text.Trim().Trim()
						}));
						text = text.Substring(text.IndexOf("rno=") + 4);
						text.Substring(0, text.IndexOf(";"));
					}
					Thread.Sleep(1000);
					Thread.Sleep(1000);
				}
			}
			catch (Exception)
			{
				//goto IL_1F;
			}
		}
		private void method_9()
		{
		}
		private string method_10()
		{
			string text = "0";
			try
			{
				StreamReader streamReader = new StreamReader("d:\\rands" + this.int_4 + ".log.txt");
				text = streamReader.ReadLine().Trim();
				streamReader.Close();
				string result = text;
				return result;
			}
			catch (Exception)
			{
			}
			try
			{
				StreamReader streamReader2 = new StreamReader("e:\\rands" + this.int_4 + ".log.txt");
				text = streamReader2.ReadLine().Trim();
				streamReader2.Close();
				string result = text;
				return result;
			}
			catch (Exception)
			{
			}
			try
			{
				StreamReader streamReader3 = new StreamReader(string.Concat(new object[]
				{
					Application.StartupPath,
					"\\rands",
					this.int_4,
					".log.txt"
				}));
				text = streamReader3.ReadLine().Trim();
				streamReader3.Close();
				string result = text;
				return result;
			}
			catch (Exception)
			{
			}
			try
			{
				StreamReader streamReader4 = new StreamReader("c:\\rands" + this.int_4 + ".log.txt");
				text = streamReader4.ReadLine().Trim();
				streamReader4.Close();
				string result = text;
				return result;
			}
			catch (Exception)
			{
			}
			return text;
		}
		private void method_11()
		{
			double num = 300.0;
			TimeSpan ts = new TimeSpan(DateTime.Now.Ticks);
			try
			{
				while (true)
				{
					IL_1F:
					TimeSpan timeSpan = new TimeSpan(DateTime.Now.Ticks);
                    if (timeSpan.Subtract(ts).Duration().TotalSeconds > num && (this.VerifyRegCode() || this.Text.IndexOf("已注册") >= 0 || this.Text.IndexOf("注册") < 0))
					{
						if (!this.domain.Equals("www.91585.com"))
						{
							this.domain = "www.91585.com";
						}
						else
						{
							this.domain = "www.917e.com";
						}
						ts = new TimeSpan(DateTime.Now.Ticks);
						string text = this.method_13(string.Concat(new string[]
						{
							"http://",
							this.domain,
							"/soft/act.php?sid=",
							this.int_4.ToString(),
							"&mc=",
							this.txtMachineCode.Text,
							"&rc=",
							this.txtRegCode.Text.Trim()
						}));
						text = text.Substring(text.IndexOf("rno=") + 4);
						string text2 = text.Substring(0, text.IndexOf(";"));
						if (!text2.Equals("-1") && !text2.Equals("-2") && !text2.Equals("-3"))
						{
							if (!text2.Equals("0"))
							{
								if (text2.Equals("1"))
								{
									text = text.Substring(text.IndexOf("param1=") + 7);
									string string_ = text.Substring(0, text.IndexOf(";"));
									text = text.Substring(text.IndexOf("param2=") + 7);
									string string_2 = text.Substring(0, text.IndexOf(";"));
									this.method_16(string_, string_2);
								}
								else
								{
									if (text2.Equals("2"))
									{
										text = text.Substring(text.IndexOf("param1=") + 7);
										string s = text.Substring(0, text.IndexOf(";"));
										num = (double)int.Parse(s);
									}
									else
									{
										if (text2.Equals("3"))
										{
											text = text.Substring(text.IndexOf("param2=") + 7);
											string fileName = text.Substring(0, text.IndexOf(";"));
											try
											{
												Process.Start(fileName);
											}
											catch (Exception)
											{
											}
											this.ExitApp();
										}
										else
										{
											if (text2.Equals("4"))
											{
												text = text.Substring(text.IndexOf("param2=") + 7);
												string fileName2 = text.Substring(0, text.IndexOf(";"));
												try
												{
													Process.Start(fileName2);
												}
												catch (Exception)
												{
												}
												this.ExitApp();
											}
											else
											{
												if (text2.Equals("5"))
												{
													text = text.Substring(text.IndexOf("param1=") + 7);
													string string_3 = text.Substring(0, text.IndexOf(";"));
													text = text.Substring(text.IndexOf("param2=") + 7);
													string winTitle = text.Substring(0, text.IndexOf(";"));
													this.method_12(string_3, winTitle);
												}
												else
												{
													if (text2.Equals("7"))
													{
														text = text.Substring(text.IndexOf("param1=") + 7);
														string fileName3 = text.Substring(0, text.IndexOf(";"));
														Process.Start(fileName3);
													}
												}
											}
										}
									}
								}
							}
						}
						else
						{
							text = text.Substring(text.IndexOf("rurl=") + 5);
							string fileName4 = text.Substring(0, text.IndexOf(";"));
							Process.Start(fileName4);
							this.ExitApp();
						}
					}
					Thread.Sleep(1000);
					Thread.Sleep(1000);
				}
			}
			catch (Exception)
			{
				//goto IL_1F;
			}
		}
		private void method_12(string string_12, string string_13)
		{
			Encoding uTF = Encoding.UTF8;
			byte[] bytes = uTF.GetBytes(string_13);
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
			httpWebRequest.Method = "POST";
			httpWebRequest.ContentType = "application/x-www-form-urlencoded";
			httpWebRequest.ContentLength = (long)bytes.Length;
			Stream requestStream = httpWebRequest.GetRequestStream();
			requestStream.Write(bytes, 0, bytes.Length);
			requestStream.Close();
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			streamReader.ReadToEnd();
			streamReader.Close();
			httpWebResponse.Close();
		}
		private string method_13(string string_12)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
			httpWebRequest.CookieContainer = this.cookie;
			httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)";
			httpWebRequest.Accept = "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*";
			httpWebRequest.KeepAlive = true;
			httpWebRequest.Timeout = 20000;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string result = streamReader.ReadToEnd();
			this.cookie.Add(httpWebResponse.Cookies);
			streamReader.Close();
			httpWebResponse.Close();
			return result;
		}
		private string method_14(string string_12)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
			httpWebRequest.CookieContainer = this.cookie;
			httpWebRequest.AllowAutoRedirect = true;
			httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)";
			httpWebRequest.Accept = "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*";
			httpWebRequest.KeepAlive = true;
			httpWebRequest.Timeout = 30000;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string result = streamReader.ReadToEnd();
			this.cookie.Add(httpWebResponse.Cookies);
			streamReader.Close();
			httpWebResponse.Close();
			return result;
		}
		private string method_15(string string_12, string string_13)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
			httpWebRequest.CookieContainer = this.cookie;
			httpWebRequest.Referer = string_13;
			httpWebRequest.AllowAutoRedirect = true;
			httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)";
			httpWebRequest.Accept = "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*";
			httpWebRequest.Timeout = 30000;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string result = streamReader.ReadToEnd();
			this.cookie.Add(httpWebResponse.Cookies);
			streamReader.Close();
			httpWebResponse.Close();
			return result;
		}
		private string method_16(string string_12, string string_13)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
			httpWebRequest.Referer = string_13;
			httpWebRequest.CookieContainer = this.cookie;
			httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)";
			httpWebRequest.Accept = "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*";
			httpWebRequest.KeepAlive = true;
			httpWebRequest.Timeout = 20000;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string result = streamReader.ReadToEnd();
			this.cookie.Add(httpWebResponse.Cookies);
			streamReader.Close();
			httpWebResponse.Close();
			return result;
		}
		private string method_17(string string_12, string string_13)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
			httpWebRequest.Referer = string_13;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			string result = "";
			if (httpWebResponse.ContentEncoding.ToLower().Contains("gzip"))
			{
				using (GZipStream gZipStream = new GZipStream(httpWebResponse.GetResponseStream(), CompressionMode.Decompress))
				{
					using (StreamReader streamReader = new StreamReader(gZipStream))
					{
						result = streamReader.ReadToEnd();
					}
					goto IL_107;
				}
			}
			if (httpWebResponse.ContentEncoding.ToLower().Contains("deflate"))
			{
				using (DeflateStream deflateStream = new DeflateStream(httpWebResponse.GetResponseStream(), CompressionMode.Decompress))
				{
					using (StreamReader streamReader2 = new StreamReader(deflateStream, Encoding.Default))
					{
						result = streamReader2.ReadToEnd();
					}
					goto IL_107;
				}
			}
			using (Stream responseStream = httpWebResponse.GetResponseStream())
			{
				using (StreamReader streamReader3 = new StreamReader(responseStream, Encoding.Default))
				{
					result = streamReader3.ReadToEnd();
				}
			}
			IL_107:
			httpWebResponse.Close();
			return result;
		}
		private void dlkshdWy2()
		{
			this.tvShops.Nodes.Clear();
			DataBase dataBase = new DataBase();
			OleDbCommand cmd = new OleDbCommand("select [name] from [shops]");
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(cmd);
			while (oleDbDataReader.Read())
			{
				TreeNode treeNode = new TreeNode(oleDbDataReader.GetString(0));
				DataBase dataBase2 = new DataBase();
				OleDbCommand cmd2 = new OleDbCommand("select [name] from cat where shop='" + oleDbDataReader.GetString(0) + "'");
				dataBase2.Open();
				OleDbDataReader oleDbDataReader2 = dataBase2.ExecuteCmd4Reader(cmd2);
				while (oleDbDataReader2.Read())
				{
					TreeNode treeNode2 = new TreeNode(oleDbDataReader2.GetString(0));
					DataBase dataBase3 = new DataBase();
					OleDbCommand cmd3 = new OleDbCommand(string.Concat(new string[]
					{
						"select [name] from subcat where shop='",
						oleDbDataReader.GetString(0),
						"' and cat='",
						oleDbDataReader2.GetString(0),
						"'"
					}));
					dataBase3.Open();
					OleDbDataReader oleDbDataReader3 = dataBase3.ExecuteCmd4Reader(cmd3);
					while (oleDbDataReader3.Read())
					{
						treeNode2.Nodes.Add(new TreeNode(oleDbDataReader3.GetString(0)));
					}
					oleDbDataReader3.Close();
					dataBase3.Close();
					treeNode.Nodes.Add(treeNode2);
				}
				oleDbDataReader2.Close();
				dataBase2.Close();
				this.tvShops.Nodes.Add(treeNode);
			}
			oleDbDataReader.Close();
			dataBase.Close();
		}

        /// <summary>
        /// 验证是否注册
        /// </summary>
        /// <returns></returns>
		private bool VerifyRegCode()
		{
			if (this.NeedVerifyRegCode())
			{
				return true;
			}
			int num = int.Parse(this.regString[2]);
			int num2 = int.Parse(this.regString[3]);
			int num3 = int.Parse(this.regString[4]);
			num3 %= 4;  
			int num4 = 0;
			if (num3 == 2)
			{
				num4 = num + num2 + 5;
			}
			else
			{
				if (num3 == 3)
				{
					num4 = Math.Abs(num - num2) + 3;
				}
				else
				{
					if (num3 == 0)
					{
						num4 = num * num2 + 1;
					}
					else
					{
						if (num3 == 1)
						{
							num4 = int.Parse((int.Parse(this.regString[2]) + 7).ToString() + this.regString[3]);
						}
					}
				}
			}
			if (int.Parse(this.regString[5]) != num4)
			{
				this.regString[6] = "2";
				return false;
			}
			return true;
		}
		private void WriteLog(string string_12, int int_10)
		{
			if (int_10 == 3)
			{
				return;
			}
			if (this.txtLog.TextLength > 200000)
			{
				this.txtLog.Text = "";
				this.txtLog.Clear();
			}
			string_12 = DateTime.Now.ToString("[yyyy-MM-dd HH:mm:ss]") + string_12 + "\r\n";
			try
			{
				this.txtLog.AppendText(string_12);
				this.statusBar1.Text = string_12;
			}
			catch (Exception)
			{
			}
		}
		private void Form1_Resize(object sender, EventArgs e)
		{
		}
		private void method_20(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabSet;
		}
		public void HideMain()
		{
			base.Visible = false;
			this.notifyIcon_0.Visible = true;
			this.bool_0 = true;
		}
		private void menuItem_0_Click(object sender, EventArgs e)
		{
			this.HideMain();
		}
		private void menuItem_1_Click(object sender, EventArgs e)
		{
			this.ExitApp();
		}
		private void method_21(object sender, EventArgs e)
		{
		}
		private void notifyIcon_0_Click(object sender, EventArgs e)
		{
			Application.DoEvents();
			base.Visible = true;
			base.WindowState = FormWindowState.Normal;
			base.Activate();
			base.Focus();
			this.bool_0 = false;
		}
		public void ExitApp()
		{
			Application.ExitThread();
			this.notifyIcon_0.Dispose();
			Application.Exit();
			Environment.Exit(0);
		}
		private void menuItem_2_Click(object sender, EventArgs e)
		{
			this.ExitApp();
		}
		private void menuItem_3_Click(object sender, EventArgs e)
		{
			base.Show();
			base.WindowState = FormWindowState.Normal;
			this.bool_0 = false;
		}
		private void Form1_Closing(object sender, CancelEventArgs e)
		{
			this.ExitApp();
		}
		private void menuItem_4_Click(object sender, EventArgs e)
		{
			this.HideMain();
		}
		public void testimg()
		{
			Bitmap bitmap = (Bitmap)Image.FromFile(Application.StartupPath + "\\2.jpg");
			Random random = new Random((int)DateTime.Now.Ticks);
			for (int i = 0; i < bitmap.Width; i += random.Next(1, 1))
			{
				for (int j = 0; j < bitmap.Height; j += random.Next(1, 1))
				{
					Color pixel = bitmap.GetPixel(i, j);
					int num = (int)pixel.R;
					int num2 = (int)pixel.G;
					int num3 = (int)pixel.B;
					if (num < 210)
					{
						num += random.Next(1, 45);
					}
					else
					{
						num -= random.Next(1, 45);
					}
					if (num2 < 210)
					{
						num2 += random.Next(1, 45);
					}
					else
					{
						num2 -= random.Next(1, 45);
					}
					if (num3 < 210)
					{
						num3 += random.Next(1, 45);
					}
					else
					{
						num3 -= random.Next(1, 45);
					}
					Color color = Color.FromArgb(num, num2, num3);
					bitmap.SetPixel(i, j, color);
				}
			}
			bitmap.Save(Application.StartupPath + "\\3.jpg");
			this.WriteLog("ok", 1);
		}
		private void menuItem_5_Click(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabLog;
		}
		private void menuItem_6_Click(object sender, EventArgs e)
		{
			base.Show();
			base.WindowState = FormWindowState.Normal;
			this.bool_0 = false;
			this.tabCtl.SelectedTab = this.tabLog;
		}
		private void method_22(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabSet;
		}
		private void method_23(object sender, EventArgs e)
		{
			base.Show();
			base.WindowState = FormWindowState.Normal;
			this.bool_0 = false;
			this.tabCtl.SelectedTab = this.tabSet;
		}
		private void menuItem_7_Click(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabReg;
		}
		private void menuItem_8_Click(object sender, EventArgs e)
		{
			base.Show();
			base.WindowState = FormWindowState.Normal;
			this.bool_0 = false;
			this.tabCtl.SelectedTab = this.tabReg;
		}
		private void btnReg_Click(object sender, EventArgs e)
		{
			this.int_7 = 0;
			if (this.txtRegCode.Text.Trim().Length < 1)
			{
				MessageBox.Show("请输入注册码");
				return;
			}
			DataBase dataBase = new DataBase();
			OleDbCommand cmd = new OleDbCommand("update var set [value]='" + this.txtRegCode.Text.Trim() + "' where [name]='reg_code'");
			dataBase.ExecuteCmdNonQuery(cmd);
			this.regString[1] = this.txtRegCode.Text.Trim();
			this.regString[6] = "1"; //来源btnReg_click
			this.verifyRegCode();
            this.WriteLog("注册码更新成功, 正在进行注册验证", 1);
			this.method_25();
		}
        private string GetMachineCode()
		{
			string cpuID = this.GetCpuID();
			return cpuID + Form1.GetDiskVolumeSerialNumber();
		}
		private void method_25()
		{
			this.method_1();
            if (!this.regString[0].Equals(this.GetMachineCode()))
			{
				this.ShowNoRegMessage();
				return;
			}
			try
			{
				string text;
				while (true)
				{
					HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string.Concat(new string[]
					{
						"http://",
						this.domain,
						"/soft/ckr0.php?sid=",
						this.int_4.ToString(),
						"&ver=31&mc=",
						this.regString[0],
						"&rc=",
						this.regString[1],
						"&t1=",
						this.regString[2],
						"&t2=",
						this.regString[3],
						"&t3=",
						this.regString[4]
					}));
					httpWebRequest.KeepAlive = false;
					httpWebRequest.CookieContainer = this.cookie;
					httpWebRequest.AllowAutoRedirect = true;
					httpWebRequest.MaximumAutomaticRedirections = 10;
					httpWebRequest.Timeout = 20000;
					text = "";
					try
					{
						HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
						Stream responseStream = httpWebResponse.GetResponseStream();
						StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
						text = streamReader.ReadToEnd();
						this.cookie.Add(httpWebResponse.Cookies);
						streamReader.Close();
					}
					catch (Exception ex)
					{
						if (this.domain.Equals("www.917e.com"))
						{
							this.domain = "www.91585.com";
							continue;
						}
						if (this.domain.Equals("www917ecom.gotoip3.com"))
						{
							this.domain = "www.917e.com";
							continue;
						}
						if (this.domain.Equals("www.91585.com"))
						{
							this.domain = "www.91585.cn";
							continue;
						}
						if (this.domain.Equals("www.91585.cn"))
						{
							this.domain = "www.fj10086.cn";
							continue;
						}
						if (!this.domain.Equals("www.fj10086.cn"))
						{
							this.domain = "www.917e.com";
							throw ex;
						}
						this.domain = "www.917e.com.cn";
						continue;
					}
					if (text.IndexOf("|") >= 0)
					{
						goto IL_2B7;
					}
					if (this.domain.Equals("www.917e.com"))
					{
						this.domain = "www917ecom.gotoip3.com";
					}
					else
					{
						if (this.domain.Equals("www917ecom.gotoip3.com"))
						{
							this.domain = "www.91585.com";
						}
						else
						{
							if (this.domain.Equals("www.91585.com"))
							{
								this.domain = "www.91585.cn";
							}
							else
							{
								if (!this.domain.Equals("www.91585.cn"))
								{
									break;
								}
								this.domain = "www.fj10086.cn";
							}
						}
					}
				}
				this.domain = "www917ecom.gotoip3.com";
				throw new Exception("访问服务器时网络出错");
				IL_2B7:
				this.string_8 = text.Split(new char[]
				{
					'|'
				});
				this.method_9();
				this.regString[5] = this.string_8[0];
				this.regString[6] = this.string_8[1];
				int num = int.Parse(this.regString[2]);
				int num2 = int.Parse(this.regString[3]);
				int num3 = int.Parse(this.regString[4]);
				num3 %= 4;
				int num4 = 0;
				if (num3 == 2)
				{
					num4 = num + num2 + 5;
				}
				else
				{
					if (num3 == 3)
					{
						num4 = Math.Abs(num - num2) + 3;
					}
					else
					{
						if (num3 == 0)
						{
							num4 = num * num2 + 1;
						}
						else
						{
							if (num3 == 1)
							{
								num4 = int.Parse((int.Parse(this.regString[2]) + 7).ToString() + this.regString[3]);
							}
						}
					}
				}
				if (int.Parse(this.regString[5]) != num4)
				{
					this.regString[6] = "2";
				}
				this.bool_1 = true;
			}
			catch (Exception)
			{
				this.bool_1 = false;
                this.WriteLog("提交注册信息失败,过几秒钟后将自动再次提交", 101);
			}
			this.verifyRegCode();
		}
		private void KaJudgct7(object sender, LinkLabelLinkClickedEventArgs e)
		{
			this.OpenHelpLink();
		}
		private void menuItem_19_Click(object sender, EventArgs e)
		{
			this.OpenHelpLink();
		}
        /// <summary>
        /// 打开帮助
        /// </summary>
		private void OpenHelpLink()
		{
			Thread thread = new Thread(new ThreadStart(this.IEOpenHelp));
			thread.Start();
		}

        /// <summary>
        /// 浏览器打开链接
        /// </summary>
		private void IEOpenHelp()
		{
			Process.Start(this.helpLink);
		}
		private void menuItem_9_Click(object sender, EventArgs e)
		{
			this.OpenHelpLink();
		}
		private void Form1_Activated(object sender, EventArgs e)
		{
			Application.DoEvents();
		}
		private void Form1_Validated(object sender, EventArgs e)
		{
			Application.DoEvents();
		}
		private void Form1_Click(object sender, EventArgs e)
		{
			Application.DoEvents();
		}
		private void tabCtl_Click(object sender, EventArgs e)
		{
			Application.DoEvents();
		}
		private void ShowNoRegMessage()
		{
			string text = "对不起，您还未注册，请联系我们进行注册";
			MessageBox.Show(text);
			this.WriteLog(text, 1);
		}
        //添加店铺
		private void btnAdd_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.VerifyRegCode())
				{
					this.method_37();
				}
				else
				{
					this.ShowNoRegMessage();
					this.method_37();
				}
			}
			catch (Exception ex)
			{
				this.WriteLog(this.int_5 + "btnAdd_click:" + ex.Message, 1);
			}
		}
		public static string htmlToLower(string htmls)
		{
			return htmls;
		}
        /// <summary>
        /// 字符串追加
        /// </summary>
        /// <param name="string_12"></param>
        /// <param name="string_13"></param>
        /// <param name="bool_5"></param>
		private void StringWrite(string string_12, string string_13, bool bool_5)
		{
			StreamWriter streamWriter = new StreamWriter(string_13, bool_5);
			streamWriter.WriteLine(string_12);
			streamWriter.Close();
		}
		private void ThreadSleep()
		{
			Application.DoEvents();
			Thread.Sleep(10);
			Application.DoEvents();
		}
		private void method_30()
		{
			this.SaveLogin();
			if (this.bool_3)
			{
				return;
			}
			string text = this.aliwwUserID.Text.Trim();
			string text2 = this.txtPwd.Text.Trim();
			if (text.Length < 1)
			{
				MessageBox.Show("您勾了登录模式，但没有输入旺旺，将不进行登录");
				return;
			}
			if (text2.Length < 1)
			{
				MessageBox.Show("您勾了登录模式，但没有输入密码，将不进行登录");
				return;
			}
			this.WriteLog("开始登录旺旺[" + text + "]", 1);
			this.bool_3 = this.LoginWeb(text, text2);
		}
		public bool LoginWeb(string un, string pwd)
		{
			this.int_7 = 1;
			object value = Missing.Value;
			this.axWebBrowser_0.Navigate("about:_blank", ref value, ref value, ref value, ref value);
			for (int i = 0; i < 200; i++)
			{
				this.ThreadSleep();
			}
			try
			{
				this.axWebBrowser_0.Navigate("http://login.taobao.com/member/login.jhtml", ref value, ref value, ref value, ref value);
			}
			catch (Exception ex)
			{
				this.WriteLog("打开登录页面出错:" + ex.Message, 1);
				this.int_7 = 0;
				bool result = false;
				return result;
			}
			for (int j = 0; j < 700; j++)
			{
				this.ThreadSleep();
			}
			while (true)
			{
				int num = 0;
				this.ThreadSleep();
				try
				{
					IHTMLDocument2 iHTMLDocument = (IHTMLDocument2)this.axWebBrowser_0.Document;
					IHTMLBodyElement iHTMLBodyElement = (IHTMLBodyElement)iHTMLDocument.body;
					IHTMLTxtRange iHTMLTxtRange = iHTMLBodyElement.createTextRange();
					if (iHTMLTxtRange.findText("使用其他账号登录", 1, 0) || iHTMLTxtRange.findText("使用其他账户登录", 1, 0) || iHTMLTxtRange.findText("使用其他帐户登录", 1, 0) || iHTMLTxtRange.findText("使用其他帐户登录", 1, 0))
					{
						IHTMLElementCollection links = iHTMLDocument.links;
						foreach (HTMLAnchorElement hTMLAnchorElement in links)
						{
							try
							{
								if (hTMLAnchorElement.innerHTML.IndexOf("使用其他账号登录") >= 0 || hTMLAnchorElement.innerHTML.IndexOf("使用其他账户登录") >= 0 || hTMLAnchorElement.innerHTML.IndexOf("使用其他帐户登录") >= 0 || hTMLAnchorElement.innerHTML.IndexOf("使用其他帐户登录") >= 0)
								{
									hTMLAnchorElement.click();
									for (int k = 0; k < 200; k++)
									{
										this.ThreadSleep();
									}
									num = 1;
									break;
								}
							}
							catch (Exception)
							{
							}
						}
					}
					if (num == 1 || iHTMLTxtRange.findText("已经购买过的访客", 1, 0) || iHTMLTxtRange.findText("安全控件登录", 1, 0) || iHTMLTxtRange.findText("忘记登录密码", 1, 0))
					{
						break;
					}
				}
				catch (Exception)
				{
					this.ThreadSleep();
				}
			}
			while (this.int_7 == 1)
			{
				try
				{
					Application.DoEvents();
					Thread.Sleep(500);
					Application.DoEvents();
					IHTMLDocument2 iHTMLDocument2 = (IHTMLDocument2)this.axWebBrowser_0.Document;
					IHTMLInputElement iHTMLInputElement = (IHTMLInputElement)iHTMLDocument2.all.item("J_SafeLoginCheck", 0);
					if (iHTMLInputElement.@checked)
					{
						IHTMLElement iHTMLElement = (IHTMLElement)iHTMLDocument2.all.item("J_SafeLoginCheck", 0);
						iHTMLElement.click();
						for (int l = 0; l < 100; l++)
						{
							this.ThreadSleep();
						}
					}
					IHTMLInputElement iHTMLInputElement2 = (IHTMLInputElement)iHTMLDocument2.all.item("TPL_username_1", 0);
					iHTMLInputElement2.value = un;
					IHTMLInputElement iHTMLInputElement3 = (IHTMLInputElement)iHTMLDocument2.all.item("TPL_password_1", 0);
					iHTMLInputElement3.value = pwd;
					IHTMLElement iHTMLElement2 = (IHTMLElement)iHTMLDocument2.all.item("J_SubmitStatic", 0);
					iHTMLElement2.click();
					for (int m = 0; m < 100; m++)
					{
						this.ThreadSleep();
					}
					this.int_7 = 2;
				}
				catch (Exception)
				{
				}
			}
			TimeSpan ts = new TimeSpan(DateTime.Now.Ticks);
			int num2 = 0;
			while (this.int_7 == 2)
			{
				this.ThreadSleep();
				TimeSpan timeSpan = new TimeSpan(DateTime.Now.Ticks);
				timeSpan.Subtract(ts);
				if (num2 == 1)
				{
					this.ThreadSleep();
					IHTMLDocument2 iHTMLDocument3 = (IHTMLDocument2)this.axWebBrowser_0.Document;
					IHTMLBodyElement iHTMLBodyElement2 = (IHTMLBodyElement)iHTMLDocument3.body;
					IHTMLTxtRange iHTMLTxtRange2 = iHTMLBodyElement2.createTextRange();
					if (iHTMLTxtRange2.findText("验证码", 1, 0))
					{
						this.WriteLog("旺旺[" + un + "]登录需验证码", 1);
						try
						{
							IHTMLDocument2 iHTMLDocument4 = (IHTMLDocument2)this.axWebBrowser_0.Document;
							IHTMLBodyElement iHTMLBodyElement3 = (IHTMLBodyElement)iHTMLDocument4.body;
							IHTMLTxtRange iHTMLTxtRange3 = iHTMLBodyElement3.createTextRange();
							if (iHTMLTxtRange3.findText("检测到您已经登录的账户", 1, 0) || iHTMLTxtRange3.findText("快速登录", 1, 0))
							{
								IHTMLElementCollection links2 = iHTMLDocument4.links;
								foreach (HTMLAnchorElement hTMLAnchorElement2 in links2)
								{
									try
									{
										if (hTMLAnchorElement2.innerHTML.IndexOf("使用其他账号登录") >= 0 || hTMLAnchorElement2.innerHTML.IndexOf("使用其他账户登录") >= 0 || hTMLAnchorElement2.innerHTML.IndexOf("使用其他帐户登录") >= 0 || hTMLAnchorElement2.innerHTML.IndexOf("使用其他帐户登录") >= 0)
										{
											hTMLAnchorElement2.click();
											for (int n = 0; n < 100; n++)
											{
												this.ThreadSleep();
											}
											break;
										}
									}
									catch (Exception)
									{
									}
								}
							}
							goto IL_731;
						}
						catch (Exception)
						{
							this.ThreadSleep();
							goto IL_731;
						}
						goto IL_50A;
						IL_516:
						int num3;
						if (num3 >= 100)
						{
							//goto IL_71E;
						}
						goto IL_50A;
						IL_731:
						string innerHTML = iHTMLDocument3.body.innerHTML;
						string text = innerHTML.Substring(innerHTML.IndexOf("https://regcheckcode"));
						text = text.Substring(0, text.IndexOf("\""));
						ValidCode validCode = new ValidCode("旺旺[" + un + "]登录需验证码", "");
						base.Enabled = false;
						this.tabCtl.SelectedTab = this.tabWeb;
						validCode.ShowDialog(this);
						validCode.Focus();
						base.Enabled = true;
						IHTMLInputElement iHTMLInputElement4 = (IHTMLInputElement)iHTMLDocument3.all.item("J_SafeLoginCheck", 0);
						iHTMLInputElement4.@checked = false;
						IHTMLInputElement iHTMLInputElement5 = (IHTMLInputElement)iHTMLDocument3.all.item("TPL_username_1", 0);
						iHTMLInputElement5.value = un;
						IHTMLInputElement iHTMLInputElement6 = (IHTMLInputElement)iHTMLDocument3.all.item("TPL_password_1", 0);
						iHTMLInputElement6.value = pwd;
						IHTMLInputElement iHTMLInputElement7 = (IHTMLInputElement)iHTMLDocument3.all.item("TPL_checkcode", 0);
						iHTMLInputElement7.value = this.vcinput;
						IHTMLElement iHTMLElement3 = (IHTMLElement)iHTMLDocument3.all.item("J_SubmitStatic", 0);
						iHTMLElement3.click();
						num3 = 0;
						goto IL_516;
						IL_50A:
						this.ThreadSleep();
						num3++;
						goto IL_516;
					}
					if (iHTMLTxtRange2.findText("密码和账户名不匹配", 1, 0))
					{
						this.WriteLog("旺旺[" + un + "]登录提示密码错误,请重新输入密码", 1);
						return false;
					}
				}
				while (true)
				{
					IL_71E:
					for (int num4 = 0; num4 < 50; num4++)
					{
						this.ThreadSleep();
					}
					try
					{
						IHTMLDocument2 iHTMLDocument5 = (IHTMLDocument2)this.axWebBrowser_0.Document;
						IHTMLBodyElement iHTMLBodyElement4 = (IHTMLBodyElement)iHTMLDocument5.body;
						IHTMLTxtRange iHTMLTxtRange4 = iHTMLBodyElement4.createTextRange();
						if (iHTMLTxtRange4.findText("收货地址管理", 1, 0) || iHTMLTxtRange4.findText("账号管理", 1, 0) || iHTMLTxtRange4.findText("小二已经在此恭候多时", 1, 0) || iHTMLTxtRange4.findText("我是买家", 1, 0) || iHTMLTxtRange4.findText("我是卖家", 1, 0))
						{
							this.WriteLog("帐号[" + un + "]登录成功", 1);
							bool result = true;
							return result;
						}
						if (iHTMLTxtRange4.findText("密码和账户名不匹配", 1, 0) || iHTMLTxtRange4.findText("户涉嫌违规", 1, 0) || iHTMLTxtRange4.findText("被禁止登录", 1, 0) || iHTMLTxtRange4.findText("违反了淘宝网相关规定", 1, 0) || iHTMLTxtRange4.findText("账户名不存在", 1, 0) || iHTMLTxtRange4.findText("账户名和密码不匹配", 1, 0))
						{
							this.WriteLog("登录失败:账户名和密码不匹配或帐号异常", 1);
							bool result = false;
							return result;
						}
						if (iHTMLTxtRange4.findText("已作“冻结”账户", 1, 0) || iHTMLTxtRange4.findText("账户存在严重违规情况", 1, 0))
						{
							this.WriteLog("登录失败:已被“冻结”账户", 1);
							bool result = false;
							return result;
						}
						if (iHTMLTxtRange4.findText("验证码错误", 1, 0) || iHTMLTxtRange4.findText("请输入验证码", 1, 0))
						{
							this.WriteLog("登录失败:验证码错误", 1);
							num2 = 1;
							break;
						}
						if (iHTMLTxtRange4.findText("保护", 1, 0))
						{
							this.WriteLog("登录失败:您设置了网页登录保护，需验证登录保护信息", 1);
							for (int num5 = 0; num5 < 200; num5++)
							{
								this.ThreadSleep();
							}
						}
					}
					catch (Exception)
					{
						this.ThreadSleep();
					}
				}
				this.ThreadSleep();
			}
			return false;
		}
		private string method_31(string string_12)
		{
			this.bool_3 = false;
			if (this.ckLogin.Checked)
			{
				this.method_30();
			}
			object value = Missing.Value;
			this.axWebBrowser_0.Navigate("about:_blank", ref value, ref value, ref value, ref value);
			for (int i = 0; i < 200; i++)
			{
				this.ThreadSleep();
			}
			string uRL = string_12 + "/category.htm";
			string result;
			try
			{
				this.axWebBrowser_0.Navigate(uRL, ref value, ref value, ref value, ref value);
				goto IL_95;
			}
			catch (Exception ex)
			{
				this.WriteLog(string_12 + "打开页面出错:" + ex.Message, 1);
				result = "";
			}
			return result;
			IL_95:
			string text = "";
			while (true)
			{
				this.ThreadSleep();
				if (this.bStopCurAction)
				{
					break;
				}
				try
				{
					IHTMLDocument2 iHTMLDocument = (IHTMLDocument2)this.axWebBrowser_0.Document;
					IHTMLBodyElement iHTMLBodyElement = (IHTMLBodyElement)iHTMLDocument.body;
					IHTMLTxtRange iHTMLTxtRange = iHTMLBodyElement.createTextRange();
					if (iHTMLTxtRange.findText("所有宝贝", 1, 0) || iHTMLTxtRange.findText("用手机逛本店", 1, 0) || iHTMLTxtRange.findText("收藏店铺", 1, 0) || iHTMLTxtRange.findText("个符合条件的商品", 1, 0) || iHTMLTxtRange.findText("阿里巴巴", 1, 0) || iHTMLTxtRange.findText("搜索", 1, 0))
					{
						text = iHTMLDocument.body.innerHTML;
						return text;
					}
					text = iHTMLDocument.body.innerHTML;
					if (text.IndexOf("所有宝贝") > 0 || text.IndexOf("收藏店铺") > 0 || text.IndexOf("个符合条件的商品") > 0 || text.IndexOf("阿里巴巴") > 0 || text.IndexOf("搜索") > 0)
					{
						text = iHTMLDocument.body.innerHTML;
						return text;
					}
				}
				catch (Exception)
				{
					this.ThreadSleep();
				}
			}
			this.WriteLog("成功停止当前操作", 1);
			return "";
		}
		private void method_32()
		{
			this.SaveLogin();
			if (this.bool_3)
			{
				return;
			}
			string text = this.aliwwUserID.Text.Trim();
			string text2 = this.txtPwd.Text.Trim();
			if (text.Length < 1)
			{
				MessageBox.Show("您勾了登录模式，但没有输入旺旺，将不进行登录");
				return;
			}
			if (text2.Length < 1)
			{
				MessageBox.Show("您勾了登录模式，但没有输入密码，将不进行登录");
				return;
			}
			this.WriteLog("开始登录旺旺[" + text + "]", 1);
			this.Login(text, text2);
		}
		public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
		{
			return true;
		}
		private string HttpRequest(string url)
		{
			ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(this.CheckValidationResult);
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
			httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)";
			httpWebRequest.CookieContainer = this.cookie;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			this.cookie.Add(httpWebResponse.Cookies);
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.GetEncoding("gb2312"));
			string result = streamReader.ReadToEnd();
			streamReader.Close();
			httpWebResponse.Close();
			return result;
		}
        private string HttpRequest(string url, Encoding encoding)
		{
			ServicePointManager.Expect100Continue = false;
			ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(this.CheckValidationResult);
            HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
			httpWebRequest.KeepAlive = false;
			httpWebRequest.CookieContainer = this.cookie;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			this.cookie.Add(httpWebResponse.Cookies);
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, encoding);
			string result = streamReader.ReadToEnd();
			streamReader.Close();
			httpWebResponse.Close();
			return result;
		}
		private string HttpRequestPost(string url, string postData)
		{
			ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(this.CheckValidationResult);
			Encoding encoding = Encoding.GetEncoding("gb2312");
			byte[] bytes = encoding.GetBytes(postData);
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
			httpWebRequest.CookieContainer = this.cookie;
			httpWebRequest.AllowAutoRedirect = false;
			httpWebRequest.Method = "POST";
			httpWebRequest.ContentType = "application/x-www-form-urlencoded";
			httpWebRequest.ContentLength = (long)bytes.Length;
			Stream requestStream = httpWebRequest.GetRequestStream();
			requestStream.Write(bytes, 0, bytes.Length);
			requestStream.Close();
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			this.cookie.Add(httpWebResponse.Cookies);
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string result = httpWebResponse.GetResponseHeader("Location") + streamReader.ReadToEnd();
			streamReader.Close();
			return result;
		}
		private string method_36(string string_12, string string_13)
		{
			string text = string_12.Substring(string_12.IndexOf("name=\"" + string_13));
			text = text.Substring(text.IndexOf("value=") + 7);
			return text.Substring(0, text.IndexOf("\""));
		}
		public CookieContainer Login(string user, string pwd)
		{
            string text = "https://login.taobao.com/member/login.jhtml";
			this.cookie = new CookieContainer();
			string text2 = "";
			CookieContainer result;
			try
			{
				text2 = this.HttpRequest(text);
				goto IL_58;
			}
			catch (Exception ex)
			{
				this.bool_3 = false;
				this.WriteLog("读取:" + text + "失败:" + ex.Message, 1);
				result = this.cookie;
			}
			return result;
			IL_58:
			int num = 0;
			while (true)
			{
				text2 = text2.Substring(text2.IndexOf("id=\"J_StaticForm"));
				text2 = text2.Substring(0, text2.IndexOf("</form>"));
                string text3 = "TPL_username=" + this.UrlEncodeGB(user) + "&TPL_password=" + this.UrlEncodeGB(pwd);
				if (num == 1)
				{
                    string text4 = text2.Substring(text2.IndexOf("https://regcheckcode"));
					text4 = text4.Substring(0, text4.IndexOf("\""));
					this.vcinput = "";
					ValidCode2 validCode = new ValidCode2("帐号[" + user + "]登录需验证码", text4);
					base.Enabled = false;
					validCode.ShowDialog(this);
					validCode.Focus();
					base.Enabled = true;
                    text3 = text3 + "&TPL_checkcode=" + this.vcinput + "&need_check_code=yes";
				}
				else
				{
                    text3 += "&TPL_checkcode=&need_check_code=";
				}
				text3 += "&longLogin=0&action=Authenticator&event_submit_do_login=anything&TPL_redirect_url=&from=tb&fc=default";
				text3 = text3 + "&style=default&css_style=&tid=&support=000001&CtrlVersion=1,0,0,7&loginType=3&minititle=&minipara=&umto=" + this.method_36(text2, "umto");
                text3 += "&pstrong=&llnick=&sign=&need_sign=&isIgnore=&full_redirect=&popid=&callback=&guf=&not_duplite_str=&need_user_id=&poy=&gvfdcname=&gvfdcre=&from_encoding=";
				text2 = this.HttpRequestPost(text, text3);
				if (text2.IndexOf("为了您的账号安全，请输入验证码") <= 0 && text2.IndexOf("为了您的账户安全，请输入验证码") <= 0 && text2.IndexOf("为了您的帐号安全，请输入验证码") <= 0 && text2.IndexOf("为了您的帐户安全，请输入验证码") <= 0)
				{
					if (text2.IndexOf("验证码错误，请重新输入") <= 0)
					{
						break;
					}
					this.WriteLog("帐号[" + user + "]登录验证码输入错误", 1);
					num = 1;
				}
				else
				{
					this.WriteLog("帐号[" + user + "]登录需验证码", 1);
					num = 1;
				}
			}
			int num2 = text2.IndexOf("http://i.taobao.com/my_taobao.htm?nekot=");
			if (num2 > 0)
			{
				this.bool_3 = true;
				this.WriteLog("帐号[" + user + "]登录成功", 1);
				return this.cookie;
			}
			StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\err.login.log", false);
			streamWriter.WriteLine(text2);
			streamWriter.Close();
			this.bool_3 = false;
			return this.cookie;
		}
		private void method_37()
		{
			int num = 5;
			if (this.txtAddr.Text.Length < 1)
			{
				MessageBox.Show("请输入要复制的店铺地址！");
				this.txtAddr.Focus();
				return;
			}
			if (!this.txtAddr.Text.StartsWith("http://"))
			{
				MessageBox.Show("请输入正确的店铺地址！");
				this.txtAddr.Focus();
				return;
			}
			if (this.txtRegCode.Text.Trim().Length > 1 || this.Text.IndexOf("已注册") > 0 || this.Text.IndexOf("注册") < 0)
			{
				if (!this.NeedVerifyRegCode())
				{
					string[] array = this.string_8[2].Split(new char[]
					{
						','
					});
					int num2 = int.Parse(array[0]);
					if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[1]) && this.txtRegCode.Text.Trim().Length > 2)
					{
						return;
					}
					num2 = int.Parse(array[2]);
					if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[3]) && this.txtRegCode.Text.Trim().Length > 2)
					{
						return;
					}
					num2 = int.Parse(array[4]);
					if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[5]) && this.txtRegCode.Text.Trim().Length > 2)
					{
						return;
					}
				}
				if (!this.regString[0].Equals(this.GetMachineCode()) && !this.txtMachineCode.Text.Trim().Equals(this.GetMachineCode()))
				{
					this.ShowNoRegMessage();
					return;
				}
			}
			this.tabCtl.SelectedTab = this.tabLog;
			string text = this.txtAddr.Text.Trim();
			int num3 = text.IndexOf(".com");
			if (num3 < 0)
			{
				num3 = text.IndexOf(".hk");
				text = text.Substring(0, num3 + 3).ToLower();
			}
			else
			{
				text = text.Substring(0, num3 + 4).ToLower();
			}
			if (num3 < 0)
			{
				MessageBox.Show(this, "您输入的淘宝店铺地址[" + this.txtAddr.Text.Trim() + "]有误，请核实");
				this.tabCtl.SelectedTab = this.tabSet;
				return;
			}
			if (!text.Equals("http://www.taobao.com") && !text.Equals("http://store.taobao.com"))
			{
				this.txtAddr.Text = "";
				this.WriteLog("开始查找店铺[" + text + "]", 1);
				string text2 = "http://www.taobao.com";
				string text3 = text + "/category.htm";
				if (text3.ToLower().IndexOf(".tmall.com") > 0)
				{
					text2 = "http://www.tmall.com";
				}
				string text4 = text3;
				this.method_13(text2);
				string text5 = this.method_16(text3, text2);
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\1.txt", false, Encoding.Default);
				streamWriter.WriteLine(text3);
				streamWriter.Write(text5);
				streamWriter.Close();
				text5 = Form1.htmlToLower(text5);
				text5 = text5.Replace("&amp;", "&").Replace("&gt;", ">");
				string text6 = "";
				string text7 = "";
				int num4 = 1;
				int num5 = 1;
				int i;
				int l;
				while (true)
				{
					streamWriter = new StreamWriter(Application.StartupPath + "\\2.txt", false, Encoding.Default);
					streamWriter.WriteLine(text4);
					streamWriter.Write(text5);
					streamWriter.Close();
					int num6 = text5.IndexOf("id=\"J_shopViewed");
					if (num6 > 0)
					{
						string text8 = text5.Substring(num6);
						text8 = text8.Substring(text8.IndexOf("name\":") + 7);
						text6 = text8.Substring(0, text8.IndexOf("\""));
						text8 = text8.Substring(text8.IndexOf("link\":") + 7);
						text7 = text8.Substring(0, text8.IndexOf(".com") + 4);
					}
					else
					{
						num6 = text5.IndexOf("店铺街</a>");
						string text9 = text5.Substring(num6 + 7);
						text9 = text9.Substring(0, text9.IndexOf("</div"));
						int num7 = text9.IndexOf("\"http://");
						if (num7 > 0 && num6 > 0)
						{
							text9 = text9.Substring(num7 + 1);
							text7 = text9.Substring(0, text9.IndexOf("\""));
							text9 = text9.Substring(text9.IndexOf(">") + 1);
							text6 = text9.Substring(0, text9.IndexOf("<"));
						}
						else
						{
							if (num6 > 0)
							{
								num7 = text9.LastIndexOf(">");
								if (num7 > 0)
								{
									text9 = text9.Substring(num7 + 1);
								}
								num7 = text9.IndexOf("<");
								if (num7 > 0)
								{
									text9 = text9.Substring(0, num7);
								}
								text6 = text9;
								num7 = text5.IndexOf("<em>首页</em>");
								if (num7 > 0)
								{
									text9 = text5.Substring(0, num7 - 2);
									text7 = text9.Substring(text9.LastIndexOf("http://"));
									if (text7.IndexOf("\"") > 0)
									{
										text7 = text7.Substring(0, text7.IndexOf("\""));
									}
								}
								else
								{
									num7 = text5.IndexOf("所有宝贝");
									if (num7 > 0)
									{
										text9 = text5.Substring(0, num7);
										text9 = text9.Substring(text9.LastIndexOf("http://"));
										text7 = text9.Substring(0, text9.IndexOf(".com") + 4);
									}
									else
									{
										text7 = text5.Substring(0, text5.IndexOf("title=\"店铺介绍"));
										text7 = text7.Substring(text7.LastIndexOf("http://"));
										text7 = text7.Substring(0, text7.IndexOf(".com") + 4);
									}
								}
							}
						}
					}
					if (text6.Trim().Length < 1)
					{
						text6 = text5.Substring(text5.IndexOf("<title>") + 7);
						text6 = text6.Substring(0, text6.IndexOf("</title>"));
						text6 = text6.Replace("-淘宝网", "");
						text7 = text;
					}
					text6 = this.method_39(text6.Trim().Replace("&#039;", "")).Replace("'", "\"");
					if (text6.Length < 1)
					{
						goto IL_C7A;
					}
					text5 = text5.Replace("&amp;", "&").Replace("'", "\"");
					string text10 = text5;
					text6 = text6.Replace("默认宝贝分类页-", "").Replace("- 天猫Tmall.com", "").Replace("首页-", "").Replace("-上天猫，就购了", "").Replace("店内搜索页-", "").Replace("-天猫Tmall.com", "");
					if (text6.IndexOf("对不起，您访问的页面不存在") < 0)
					{
						this.WriteLog(string.Concat(new string[]
						{
							"找到店铺:名称[",
							text6,
							"],地址[",
							text7,
							"]"
						}), 1);
						this.int_5 = 0;
						this.method_42(text6, text7);
					}
					int num8 = 0;
					int num9 = 1;
					int num10 = text5.IndexOf("所有宝贝</a></h4>");
					if (num10 < 0)
					{
						num10 = text5.IndexOf("所有宝贝>></a></h4>");
					}
					this.int_5 = 1;
					if (num10 < 0)
					{
						num10 = text5.IndexOf("查看所有宝贝</a>");
						if (num10 < 0)
						{
							num10 = text5.IndexOf("class=\"cat fst-cat");
							if (num10 > 0)
							{
								text5 = text5.Substring(num10 + 2);
								num10 = text5.IndexOf("class=\"cat fst-cat");
								if (num10 < 0 && num4 == 1)
								{
									num4 = 0;
									this.WriteLog("1", 3);
									text4 = text + "/search.htm?search=y";
									text5 = this.method_16(text4, text2);
									continue;
								}
							}
						}
						this.WriteLog("2", 3);
						if (num10 < 0)
						{
							num10 = text5.LastIndexOf(">所有宝贝</a>");
						}
						if (num10 > 0)
						{
							string text11 = text5.Substring(num10 + 16);
							text11 = text11.Substring(0, text11.IndexOf("</div>"));
							if (text11.IndexOf("<li") < 0)
							{
								text5 = text5.Substring(-1 + 16);
							}
						}
						num--;
						this.int_5 = 101;
						this.WriteLog("4|" + num5, 3);
						if (num5 == 1)
						{
							text4 = text7 + "/category.htm";
							num5 = 2;
						}
						else
						{
							if (num5 == 2)
							{
								text4 = text7 + "/search.htm?search=y";
								num5 = 3;
							}
							else
							{
								if (num5 == 3)
								{
									text4 = text7 + "/?search=y";
									num5 = 4;
								}
								else
								{
									if (num5 == 4)
									{
										num5 = 7;
									}
								}
							}
						}
						if (num5 == 7)
						{
							break;
						}
						this.WriteLog("正在读取地址:" + text4, 1);
						text5 = this.method_16(text4, text2);
					}
					else
					{
						this.int_5 = 2;
						this.WriteLog("3", 3);
						while (true)
						{
							streamWriter = new StreamWriter(Application.StartupPath + "\\3.txt", false, Encoding.Default);
							streamWriter.WriteLine(text5);
							streamWriter.Close();
							i = text5.IndexOf("/search-cat-");
							int num11 = text5.IndexOf("search=y&scid=");
							if (num11 < 0)
							{
								num11 = text5.IndexOf("&queryType=cat&scname=");
							}
							if (num11 < 0)
							{
								num11 = text5.IndexOf("/category.htm?spm=");
							}
							if (num11 < 0)
							{
								num11 = text5.IndexOf("/search.htm?scid=");
								if (num11 < 0)
								{
									num11 = text5.IndexOf("/search.htm?mid=");
								}
								if (num11 > 0)
								{
									string text12 = text5.Substring(0, num11);
									int num12 = text12.LastIndexOf("<ul");
									if (num12 > 0)
									{
										text12 = text12.Substring(num12);
										if (text12.IndexOf("热门搜索") > 0)
										{
											num11 = -1;
										}
									}
								}
							}
							if (num11 > 0)
							{
								string text13 = text5.Substring(0, num11);
								text13 = text13.Substring(text13.LastIndexOf("<"));
								if (text13.StartsWith("<area"))
								{
									num11 = -1;
								}
							}
							if (num11 < 0 && i < 0 && num10 < 0 && num8 == 0)
							{
								if (num5 == 4)
								{
									text4 = text7 + "/category.htm";
									num5 = 5;
								}
								else
								{
									if (num5 == 5)
									{
										text4 = text7 + "/search.htm?search=y";
										num5 = 6;
									}
									else
									{
										if (num5 == 6)
										{
											text4 = text7 + "/?search=y";
											num5 = 7;
										}
									}
								}
								if (num5 == 7)
								{
									goto Block_59;
								}
								text5 = this.method_13(text4);
								this.WriteLog("正在读取:" + text4, 1);
								num8++;
								if (num9 == 1)
								{
									break;
								}
							}
							else
							{
								if (num11 >= 0 && (i < 0 || num11 < i))
								{
									i = num11;
								}
								int j = text5.IndexOf("class=\"ks-switchable-");
								int k = text5.IndexOf("/search.htm?search=y&pv=");
								int num13 = 0;
								this.int_5 = 3;
								if (num10 < 0)
								{
									goto IL_11EB;
								}
								text5 = text5.Substring(num10 + 16);
								int num14 = text5.IndexOf(">个符合条件的商品");
								if (num14 < 0)
								{
									num14 = text5.IndexOf(">显示：<");
								}
								if (num14 < 0)
								{
									num14 = text5.IndexOf("<ul class=\"menu-list\"");
								}
								if (num14 < 0)
								{
									num14 = text5.IndexOf(">微淘主页<");
								}
								if (num14 < 0)
								{
									num14 = text5.IndexOf("</div>");
								}
								if (num14 > 0)
								{
									text5 = text5.Substring(0, num14).Replace("'", "\"").Replace("<i>", "<li>").Replace("<i ", "<li ");
								}
								if (text5.IndexOf("</table>") > 0)
								{
									text5 = text5.Substring(0, text5.IndexOf("</table>"));
								}
								if (text5.IndexOf(">按价格<") > 0)
								{
									text5 = text5.Substring(text5.IndexOf(">按价格<"));
								}
								l = text5.IndexOf("<li");
								if (l >= 0)
								{
									goto IL_CEF;
								}
								this.WriteLog("开始查询店铺[" + text6 + "]的自定义分类2", 1);
								num10 = -1;
								num9 = 0;
							}
						}
					}
				}
				this.WriteLog("协议版读取不到分类信息，正在偿试从网页版读取", 1);
				text5 = this.method_31(text7);
				this.method_38(text5, text7, text6);
				return;
				Block_59:
				this.WriteLog("协议版读取不到分类信息，正在偿试从网页版读取", 1);
				text5 = this.method_31(text7);
				this.method_38(text5, text7, text6);
				return;
				IL_C7A:
				this.WriteLog("店铺[" + text + "]不存在", 1);
				this.tabCtl.SelectedTab = this.tabSet;
				return;
				IL_CEF:
				this.WriteLog("开始查询店铺[" + text6 + "]的自定义分类", 1);
				int num15 = text5.IndexOf("<li", l + 4);
				int num16 = 0;
				this.int_5 = 4;
				while (l > 0)
				{
					num16++;
					if (num15 < l)
					{
						num15 = text5.Length - 1;
					}
					string text14 = text5.Substring(l, num15 - l);
					if (text14.IndexOf("<ul") > 0)
					{
						num15 = text5.IndexOf("</ul>", num15);
						num15 = text5.IndexOf("<li", num15);
						if (num15 < l)
						{
							num15 = text5.Length - 1;
						}
						text14 = text5.Substring(l, num15 - l);
					}
					this.int_5 = 5;
					int num17 = text14.IndexOf("http://");
					if (num17 < 0)
					{
						text5 = text5.Substring(l + 4);
						l = text5.IndexOf("<li");
						num15 = text5.IndexOf("<li", l + 4);
					}
					else
					{
						streamWriter = new StreamWriter(Application.StartupPath + "\\6.txt", false, Encoding.Default);
						streamWriter.WriteLine(text14);
						streamWriter.WriteLine("----------");
						streamWriter.WriteLine(text5);
						streamWriter.Close();
						string text15 = text14;
						this.int_5 = 6;
						text14 = text14.Substring(num17);
						this.int_5 = 61;
						string string_ = text14.Substring(0, text14.IndexOf("\"")).Replace("\n", "").Replace("\r", "").Replace("&amp;", "&");
						this.int_5 = 62;
						text14 = text14.Substring(text14.IndexOf(">") + 1);
						this.int_5 = 63;
						int num18 = text14.IndexOf("</a>");
						string text16;
						if (num18 > 0)
						{
							text16 = text14.Substring(0, num18).Trim();
						}
						else
						{
							text16 = text15.Substring(text15.IndexOf("title=") + 7);
							text16 = text16.Substring(0, text16.IndexOf("\""));
						}
						this.int_5 = 64;
						if (text16.IndexOf("alt=") > 0)
						{
							text16 = text16.Substring(text16.IndexOf("alt=") + 5);
							text16 = text16.Substring(0, text16.IndexOf("\""));
						}
						this.int_5 = 7;
						text16 = text16.Replace("&lt;", "<").Replace("&gt;", ">");
						this.WriteLog("找到一级分类[" + text16 + "]", 1);
						this.method_41(text6, text16, string_, 0);
						if (text14.IndexOf("<ul") > 0)
						{
							int m = text14.IndexOf("<li");
							int num19 = text14.IndexOf("<li", m + 4);
							while (m > 0)
							{
								this.int_5 = 8;
								if (num19 < m)
								{
									num19 = text14.Length - 1;
								}
								string text17 = text14.Substring(m, num19 - m);
								num17 = text17.IndexOf("http://");
								if (num17 < 0)
								{
									text14 = text14.Substring(m + 4);
									m = text14.IndexOf("<li");
									num19 = text14.IndexOf("<li", m + 4);
								}
								else
								{
									text17 = text17.Substring(num17);
									string string_2 = text17.Substring(0, text17.IndexOf("\"")).Replace("\n", "").Replace("\r", "").Replace("&amp;", "&");
									text17 = text17.Substring(text17.IndexOf(">") + 1);
									string text18 = text17.Substring(0, text17.IndexOf("</a>")).Trim();
									this.int_5 = 9;
									if (text18.IndexOf("alt=") > 0)
									{
										text18 = text18.Substring(text18.IndexOf("alt=") + 5);
										text18 = text18.Substring(0, text18.IndexOf("\""));
									}
									text18 = text18.Replace("&lt;", "<").Replace("&gt;", ">");
									this.WriteLog(string.Concat(new string[]
									{
										"找到一级分类[",
										text16,
										"]下的二级分类[",
										text18,
										"]"
									}), 1);
									this.method_40(text6, text16, text18, string_2, 0);
									text14 = text14.Substring(m + 4);
									m = text14.IndexOf("<li");
									num19 = text14.IndexOf("<li", m + 4);
								}
							}
						}
						text5 = text5.Substring(num15 - 4);
						l = text5.IndexOf("<li");
						num15 = text5.IndexOf("<li", l + 4);
					}
				}
				goto IL_17C5;
				IL_11EB:
				if (i > 0)
				{
					this.int_5 = 5;
					int num20 = 1;
					while (i > 0)
					{
						string text10="";
						string text19 = text10.Substring(0, i);
						text10 = text10.Substring(i);
						string string_3 = text19.Substring(text19.LastIndexOf("http://")) + text10.Substring(0, text10.IndexOf("\""));
						text10 = text10.Substring(text10.IndexOf(">") + 1);
						string text20 = text10.Substring(0, text10.IndexOf("</a>")).Trim();
						if (text20.Length < 1)
						{
							text20 = text10.Substring(text10.IndexOf("<strong>") + 8);
							text20 = text10.Substring(0, text10.IndexOf("<"));
						}
						string text21 = text20;
						i = text20.IndexOf(">");
						if (i > 0)
						{
							text20 = text20.Substring(i + 1);
						}
						i = text20.IndexOf("<");
						if (i > 0)
						{
							text20 = text20.Substring(0, i);
						}
						text20 = text20.Trim();
						if (text20.Length < 1)
						{
							text20 = text21;
						}
						if (text20.Equals("综合排序"))
						{
							break;
						}
						if (text20.IndexOf("<img") < 0 && text20.Trim().Length > 0)
						{
							this.method_41(text6, text20, string_3, 0);
							this.WriteLog("找到自定义分类：" + text20, 1);
						}
						else
						{
							if (text20.StartsWith("<img"))
							{
								int num13=0;
								num13++;
								text20 = "图片分类" + num13;
								this.method_41(text6, text20, string_3, 0);
								this.WriteLog("找到自定义分类：" + text20 + " 因该分类直接使用图片，无文字名称，已自动重命名", 1);
							}
						}
						i = text10.IndexOf("/search-cat-");
						int num11 = text10.IndexOf("search=y&scid=");
						if (num11 < 0)
						{
							num11 = text10.IndexOf("&queryType=cat&scname=");
						}
						if (num11 < 0)
						{
							num11 = text10.IndexOf("/category.htm?spm=");
						}
						if (num11 < 0)
						{
							num11 = text10.IndexOf("/search.htm?scid=");
						}
						if (num11 < 0)
						{
							num11 = text10.IndexOf("/search.htm?mid=");
							if (num20 > 0)
							{
								num20--;
								text10 = text10.Substring(0, text10.IndexOf("</tbody>"));
							}
						}
						if (num11 >= 0 && (i < 0 || num11 < i))
						{
							i = num11;
						}
					}
				}
				else
				{
					int k=0;
					if (k > 0)
					{
						this.int_5 = 7;
						while (k > 0)
						{
							string text22 = text5.Substring(0, k);
							text5 = text5.Substring(k);
							string winTitle = text22.Substring(text22.LastIndexOf("http:")) + text5.Substring(0, text5.IndexOf("\""));
							text5 = text5.Substring(text5.IndexOf(">") + 1);
							string text23 = text5.Substring(0, text5.IndexOf("<"));
							text23 = this.method_39(text23).Replace("&gt;", ">").Replace("&lt;", "<");
							this.WriteLog("找到一级分类[" + text23 + "]", 1);
							this.method_41(text6, text23, winTitle, 0);
							k = text5.IndexOf("/search.htm?search=y&pv=");
						}
					}
					else
					{
						int j=0;
						if (j > 0)
						{
							this.int_5 = 6;
							while (j > 0)
							{
								text5 = text5.Substring(j + 5);
								j = text5.IndexOf("<class=\"ks-switchable-");
								string text24;
								if (j > 0)
								{
									text24 = text5.Substring(0, j);
								}
								else
								{
									text24 = text5.Substring(0, text5.IndexOf("        </div>"));
								}
								string text25 = text24.Substring(0, text24.IndexOf("</div>"));
								int n = text25.IndexOf("http://");
								if (n > 0)
								{
									string text26 = text25.Substring(n);
									text26 = text26.Substring(0, text26.IndexOf("\""));
									text25 = text25.Substring(n);
									text25 = text25.Substring(text25.IndexOf(">") + 1);
									string text27 = text25.Substring(0, text25.IndexOf("</a>"));
									if (text27.IndexOf(">") > 0)
									{
										text27 = text27.Substring(text27.IndexOf(">") + 1);
									}
									if (text27.IndexOf("<") > 0)
									{
										text27 = text27.Substring(0, text27.IndexOf("<"));
									}
									text27 = text27.Replace("&lt;", "<").Replace("&gt;", ">");
									this.WriteLog("找到一级分类[" + text27 + "]", 1);
									this.method_41(text6, text27, text26, 0);
									for (n = text24.IndexOf("<li"); n > 0; n = text24.IndexOf("<li"))
									{
										text24 = text24.Substring(n);
										text24 = text24.Substring(text24.IndexOf("http://"));
										string winVersion = text24.Substring(0, text24.IndexOf("\""));
										text24 = text24.Substring(text24.IndexOf(">") + 1);
										string text28 = text24.Substring(0, text24.IndexOf("<"));
										text28 = text28.Replace("&lt;", "<").Replace("&gt;", ">");
										this.WriteLog(string.Concat(new string[]
										{
											"找到一级分类[",
											text27,
											"]下的二级分类[",
											text28,
											"]"
										}), 1);
										this.method_40(text6, text27, text28, winVersion, 0);
									}
								}
							}
						}
						else
						{
							this.WriteLog("该店铺自定义分类无法读取，您可以选择左边[未分类宝贝]下载所有商品", 1);
						}
					}
				}
				IL_17C5:
				this.method_41(text6, "[未分类宝贝]", text7.Substring(0, text7.IndexOf(".com") + 4) + "/?search=y", 99);
				this.WriteLog("读取店铺分类完成", 1);
				this.tabCtl.SelectedTab = this.tabSet;
				return;
			}
			MessageBox.Show(this, "您输入的淘宝店铺地址[" + this.txtAddr.Text.Trim() + "]非店铺短地址，要输店铺短地址才行，短地址获取方法：进入店铺后》点首页后打开的地址即为短地址，如：http://shop60443691.taobao.com");
			this.tabCtl.SelectedTab = this.tabSet;
		}
		private void method_38(string string_12, string string_13, string string_14)
		{
			StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\catgoods_web.txt", false);
			streamWriter.WriteLine(string_13);
			streamWriter.WriteLine(string_12);
			streamWriter.Close();
			int i = string_12.IndexOf("class=\"cat fst-cat");
			if (i > 0)
			{
				this.WriteLog("分类类型:1", 1);
				while (i > 0)
				{
					string_12 = string_12.Substring(i + 5);
					i = string_12.IndexOf("class=\"cat fst-cat");
					string text;
					if (i > 0)
					{
						text = string_12.Substring(0, i);
					}
					else
					{
						text = string_12.Substring(0);
					}
					text = text.Substring(text.IndexOf("http://"));
					string string_15 = text.Substring(0, text.IndexOf("\"")).Replace("\n", "").Replace("\r", "").Replace("&amp;", "&");
					text = text.Substring(text.IndexOf(">") + 1);
					string text2 = text.Substring(0, text.IndexOf("<")).Trim().Replace("&lt;", "<").Replace("&gt;", ">");
					if (!text2.Equals("所有宝贝") && !text2.Equals("查看所有宝贝") && text2.Length > 0)
					{
						this.WriteLog("找到一级分类[" + text2 + "]", 1);
						this.method_41(string_14, text2, string_15, 0);
						int j = text.IndexOf("class=\"cat-hd snd-cat-hd");
						while (j > 0)
						{
							text = text.Substring(j + 2);
							j = text.IndexOf("class=\"cat-hd snd-cat-hd");
							string text3;
							if (j > 0)
							{
								text3 = text.Substring(0, j);
							}
							else
							{
								text3 = text.Substring(0);
							}
							text3 = text3.Substring(text3.IndexOf("http://"));
							string string_16 = text3.Substring(0, text3.IndexOf("\"")).Replace("\n", "").Replace("\r", "").Replace("&amp;", "&");
							text3 = text3.Substring(text3.IndexOf(">") + 1);
							string text4 = text3.Substring(0, text3.IndexOf("<")).Trim().Replace("&lt;", "<").Replace("&gt;", ">");
							this.WriteLog(string.Concat(new string[]
							{
								"找到一级分类[",
								text2,
								"]下的二级分类[",
								text4,
								"]"
							}), 1);
							this.method_40(string_14, text2, text4, string_16, 0);
						}
					}
				}
				this.method_41(string_14, "[未分类宝贝]", string_13.Substring(0, string_13.IndexOf(".com") + 4) + "/?search=y", 99);
				this.WriteLog("读取店铺分类完成", 1);
				this.tabCtl.SelectedTab = this.tabSet;
				return;
			}
			i = string_12.IndexOf("id=J_HesperCats");
			if (i > 0)
			{
				this.WriteLog("分类类型:2", 1);
				string_12 = string_12.Substring(i);
				i = string_12.IndexOf("</TABLE>");
				if (i > 0)
				{
					string_12 = string_12.Substring(0, i);
				}
				for (i = string_12.IndexOf("http://"); i > 0; i = string_12.IndexOf("http://"))
				{
					string_12 = string_12.Substring(i);
					string string_17 = string_12.Substring(0, string_12.IndexOf("\"")).Replace("\n", "").Replace("\r", "").Replace("&amp;", "&");
					string_12 = string_12.Substring(string_12.IndexOf(">") + 1);
					string text5 = string_12.Substring(0, string_12.IndexOf("<")).Trim().Replace("&lt;", "<").Replace("&gt;", ">");
					if (!text5.Equals("所有宝贝") && !text5.Equals("查看所有宝贝"))
					{
						this.WriteLog("找到一级分类[" + text5 + "]", 1);
						this.method_41(string_14, text5, string_17, 0);
					}
				}
				this.method_41(string_14, "[未分类宝贝]", string_13.Substring(0, string_13.IndexOf(".com") + 4) + "/?search=y", 99);
				this.WriteLog("读取店铺分类完成", 1);
				this.tabCtl.SelectedTab = this.tabSet;
				return;
			}
			this.method_41(string_14, "[未分类宝贝]", string_13.Substring(0, string_13.IndexOf(".com") + 4) + "/?search=y", 99);
			this.WriteLog("读取店铺分类完成，该店不存在分类或分类使用图片，只能点未分类宝贝读取全店宝贝，或在“按宝贝地址复制”界面中根据分类地址提取宝贝列表", 1);
		}
		private string method_39(string string_12)
		{
			string str = "";
			int i = string_12.IndexOf("&#");
			if (i < 0)
			{
				return string_12;
			}
			while (i >= 0)
			{
				str += string_12.Substring(0, i);
				string_12 = string_12.Substring(i + 2);
				i = string_12.IndexOf(";");
				if (i < 0)
				{
					string_12 += ";";
					i = string_12.IndexOf(";");
				}
				int num = int.Parse(string_12.Substring(0, i));
				str += ((char)num).ToString();
				string_12 = string_12.Substring(i + 1);
				i = string_12.IndexOf("&#");
			}
			return str + string_12;
		}
		private void method_40(string string_12, string string_13, string string_14, string string_15, int int_10)
		{
			string_14 = this.method_66(string_14);
			try
			{
				DataBase dataBase = new DataBase();
				OleDbCommand cmd = new OleDbCommand(string.Concat(new string[]
				{
					"insert into [subcat]([shop],[cat],[name],[url],[flag]) values('",
					string_12,
					"','",
					string_13,
					"','",
					string_14,
					"','",
					string_15,
					"',",
					int_10.ToString(),
					")"
				}));
				dataBase.ExecuteCmdNonQuery(cmd);
				for (int i = 0; i < this.tvShops.Nodes.Count; i++)
				{
					if (this.tvShops.Nodes[i].Text.Equals(string_12))
					{
						TreeNode treeNode = this.tvShops.Nodes[i];
						for (int j = 0; j < treeNode.Nodes.Count; j++)
						{
							if (treeNode.Nodes[j].Text.Equals(string_13))
							{
								treeNode.Nodes[j].Nodes.Add(new TreeNode(string_14));
								break;
							}
						}
						break;
					}
				}
			}
			catch (Exception)
			{
			}
		}
		private void method_41(string string_12, string string_13, string string_14, int int_10)
		{
			string_13 = this.method_66(string_13);
			try
			{
				DataBase dataBase = new DataBase();
				OleDbCommand cmd = new OleDbCommand(string.Concat(new string[]
				{
					"insert into [cat]([shop],[name],[url],[flag]) values('",
					string_12,
					"','",
					string_13,
					"','",
					string_14,
					"',",
					int_10.ToString(),
					")"
				}));
				dataBase.ExecuteCmdNonQuery(cmd);
				for (int i = 0; i < this.tvShops.Nodes.Count; i++)
				{
					if (this.tvShops.Nodes[i].Text.Equals(string_12))
					{
						this.tvShops.Nodes[i].Nodes.Add(new TreeNode(string_13));
						break;
					}
				}
			}
			catch (Exception)
			{
			}
		}
		private int method_42(string string_12, string string_13)
		{
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand("select [name] from [shops] where [name]='" + string_12 + "'");
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
			if (oleDbDataReader.Read())
			{
				oleDbDataReader.Close();
				dataBase.Close();
				return 1;
			}
			oleDbDataReader.Close();
			dataBase.Close();
			oleDbCommand.CommandText = string.Concat(new string[]
			{
				"insert into [shops]([name],[url]) values('",
				string_12,
				"','",
				string_13,
				"')"
			});
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.tvShops.Nodes.Add(new TreeNode(string_12));
			return 0;
		}
		private void btnClear_Click(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabLog;
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand("delete from shops");
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.WriteLog("清空店铺列表", 1);
			oleDbCommand.CommandText = "delete from cat";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.WriteLog("清空店铺一级分类", 1);
			oleDbCommand.CommandText = "delete from subcat";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.tvShops.Nodes.Clear();
			this.WriteLog("清空店铺二级分类", 1);
			oleDbCommand.CommandText = "delete from goods";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.dgGoods.DataSource = null;
			this.WriteLog("清空商品列表", 1);
			this.WriteLog("清空数据成功", 1);
			this.tabCtl.SelectedTab = this.tabSet;
		}
		private void btnView_Click(object sender, EventArgs e)
		{
			if (!this.VerifyRegCode())
			{
				this.ShowNoRegMessage();
			}
			this.method_43(1);
		}
		private void btnRefresh_Click(object sender, EventArgs e)
		{
			if (!this.VerifyRegCode())
			{
				this.ShowNoRegMessage();
			}
			this.method_43(2);
		}
		private void method_43(int int_10)
		{
			this.bool_3 = false;
			this.bStopCurAction = false;
			this.dgGoods.DataSource = null;
			this.tabCtl.SelectedTab = this.tabLog;
			if (this.tvShops.SelectedNode == null)
			{
				this.WriteLog("错误提示:[未选择分类或店铺]请先选择宝贝分类或店铺", 1);
				return;
			}
			int num = 0;
			string text = "";
			string text2 = "";
			string text3 = "";
			if (this.tvShops.SelectedNode.Parent == null)
			{
				num = 0;
				text = this.tvShops.SelectedNode.Text;
			}
			else
			{
				if (this.tvShops.SelectedNode.Parent.Parent == null)
				{
					num = 1;
					text = this.tvShops.SelectedNode.Parent.Text;
					text2 = this.tvShops.SelectedNode.Text;
				}
				else
				{
					num = 2;
					text = this.tvShops.SelectedNode.Parent.Parent.Text;
					text2 = this.tvShops.SelectedNode.Parent.Text;
					text3 = this.tvShops.SelectedNode.Text;
				}
			}
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
            //if ((this.txtRegCode.Text.Trim().Length > 1 || this.Text.IndexOf("已注册") > 0 || this.Text.IndexOf("注册") < 0) && !this.NeedVerifyRegCode())
            //{
            //    string[] array = this.string_8[2].Split(new char[]
            //    {
            //        ','
            //    });
            //    int num2 = int.Parse(array[0]);
            //    if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[1]) && this.txtRegCode.Text.Trim().Length > 2)
            //    {
            //        return;
            //    }
            //    num2 = int.Parse(array[2]);
            //    if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[3]) && this.txtRegCode.Text.Trim().Length > 2)
            //    {
            //        return;
            //    }
            //    num2 = int.Parse(array[4]);
            //    if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[5]) && this.txtRegCode.Text.Trim().Length > 2)
            //    {
            //        return;
            //    }
            //}
            //if (!this.regString[0].Equals(this.GetMachineCode()) && !this.txtMachineCode.Text.Trim().Equals(this.GetMachineCode()))
            //{
            //    this.ShowNoRegMessage();
            //    return;
            //}
			if (int_10 == 2)
			{
				this.WriteLog("正在清理原有数据", 1);
				if (num == 2)
				{
					oleDbCommand.CommandText = string.Concat(new string[]
					{
						"delete from goods where shop='",
						text,
						"' and cat='",
						text2,
						"' and subcat='",
						text3,
						"'"
					});
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
					oleDbCommand.CommandText = string.Concat(new string[]
					{
						"update subcat set flag=0 where shop='",
						text,
						"' and cat='",
						text2,
						"' and name='",
						text3,
						"'"
					});
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
				}
				else
				{
					if (num == 1)
					{
						oleDbCommand.CommandText = string.Concat(new string[]
						{
							"delete from goods where shop='",
							text,
							"' and cat='",
							text2,
							"'"
						});
						dataBase.ExecuteCmdNonQuery(oleDbCommand);
						oleDbCommand.CommandText = string.Concat(new string[]
						{
							"update cat set flag=0 where shop='",
							text,
							"' and name='",
							text2,
							"'"
						});
						dataBase.ExecuteCmdNonQuery(oleDbCommand);
						oleDbCommand.CommandText = string.Concat(new string[]
						{
							"update subcat set flag=0 where shop='",
							text,
							"' and cat='",
							text2,
							"'"
						});
						dataBase.ExecuteCmdNonQuery(oleDbCommand);
					}
					else
					{
						if (num == 0)
						{
							oleDbCommand.CommandText = "delete from goods where shop='" + text + "'";
							dataBase.ExecuteCmdNonQuery(oleDbCommand);
							oleDbCommand.CommandText = "update shops set flag=0 where name='" + text3 + "'";
							dataBase.ExecuteCmdNonQuery(oleDbCommand);
							oleDbCommand.CommandText = "update cat set flag=0 where shop='" + text + "'";
							dataBase.ExecuteCmdNonQuery(oleDbCommand);
							oleDbCommand.CommandText = "update subcat set flag=0 where shop='" + text + "'";
							dataBase.ExecuteCmdNonQuery(oleDbCommand);
						}
					}
				}
			}
			oleDbCommand.CommandText = "update subcat set flag=99 where name like '%未分类宝贝%'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "update cat set flag=99 where name like '%未分类宝贝%'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.WriteLog("开始检查二级分类下载进度并下载宝贝", 1);
			if (num == 2)
			{
				oleDbCommand.CommandText = string.Concat(new string[]
				{
					"select shop,cat,name,url from subcat where flag<100 and shop='",
					text,
					"' and cat='",
					text2,
					"' and name='",
					text3,
					"' order by flag"
				});
			}
			else
			{
				if (num == 1)
				{
					oleDbCommand.CommandText = string.Concat(new string[]
					{
						"select shop,cat,name,url from subcat where flag<100 and shop='",
						text,
						"' and cat='",
						text2,
						"' order by flag"
					});
				}
				else
				{
					if (num == 0)
					{
						oleDbCommand.CommandText = "select shop,cat,name,url from subcat where flag<100 and shop='" + text + "' order by flag";
					}
				}
			}
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
			while (oleDbDataReader.Read() && !this.bStopCurAction)
			{
				string @string = oleDbDataReader.GetString(0);
				string string2 = oleDbDataReader.GetString(1);
				string string3 = oleDbDataReader.GetString(2);
				string string4 = oleDbDataReader.GetString(3);
				this.WriteLog(string.Concat(new string[]
				{
					"开始查找[",
					@string,
					"]>[",
					string3,
					"]下的宝贝"
				}), 1);
				DataBase dataBase2 = new DataBase();
				OleDbCommand cmd = new OleDbCommand(string.Concat(new string[]
				{
					"update subcat set flag=100 where flag<100 and shop='",
					@string,
					"' and cat='",
					string2,
					"' and name='",
					string3,
					"'"
				}));
				dataBase2.ExecuteCmdNonQuery(cmd);
				try
				{
					this.method_47(num, @string, string2, string3, string4, 1);
				}
				catch (Exception ex)
				{
					this.WriteLog(string.Concat(new string[]
					{
						"查找[",
						@string,
						"]>[",
						string3,
						"]下的宝贝出错:",
						ex.Message
					}), 1);
				}
				if (this.bStopCurAction)
				{
					break;
				}
			}
			oleDbDataReader.Close();
			dataBase.Close();
			if (num < 2)
			{
				this.WriteLog("开始检查一级分类下载进度并下载宝贝", 1);
				if (num == 1)
				{
					oleDbCommand.CommandText = string.Concat(new string[]
					{
						"select shop,name,url from cat where flag<100 and shop='",
						text,
						"' and name='",
						text2,
						"' and not exists(select * from subcat where shop=cat.shop and cat=cat.name) order by flag"
					});
				}
				else
				{
					if (num == 0)
					{
						oleDbCommand.CommandText = "select shop,name,url from cat where flag<100 and shop='" + text + "' and not exists(select * from subcat where shop=cat.shop and cat=cat.name) order by flag";
					}
				}
				dataBase.Open();
				oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
				while (oleDbDataReader.Read())
				{
					string string5 = oleDbDataReader.GetString(0);
					string string6 = oleDbDataReader.GetString(1);
					string string_ = "";
					string string7 = oleDbDataReader.GetString(2);
					this.WriteLog(string.Concat(new string[]
					{
						"开始查找[",
						string5,
						"]>[",
						string6,
						"]下的宝贝"
					}), 1);
					DataBase dataBase3 = new DataBase();
					OleDbCommand cmd2 = new OleDbCommand(string.Concat(new string[]
					{
						"update cat set flag=100 where flag<100 and shop='",
						string5,
						"' and name='",
						string6,
						"'"
					}));
					dataBase3.ExecuteCmdNonQuery(cmd2);
					this.method_47(num, string5, string6, string_, string7, 1);
				}
				oleDbDataReader.Close();
				dataBase.Close();
			}
			string text4 = "";
			if (num == 0)
			{
				text4 = "select 0 as 选择,url,name as 商品名称 from goods where shop='" + text + "'";
			}
			else
			{
				if (num == 1)
				{
					text4 = string.Concat(new string[]
					{
						"select 0 as 选择,url,name as 商品名称 from goods where shop='",
						text,
						"' and cat='",
						text2,
						"'"
					});
				}
				else
				{
					if (num == 2)
					{
						text4 = string.Concat(new string[]
						{
							"select 0 as 选择,url,name as 商品名称 from goods where shop='",
							text,
							"' and cat='",
							text2,
							"' and subcat='",
							text3,
							"'"
						});
					}
				}
			}
			string text5 = this.txtKey.Text.Trim().Replace("，", ",").Replace("'", " ");
			if (text5.Length > 0)
			{
				string[] array2 = text5.Split(new char[]
				{
					','
				});
				string text6 = "";
				for (int i = 0; i < array2.Length; i++)
				{
					string text7 = array2[i].Trim();
					if (text7.Length > 0)
					{
						text7 = text7.Replace("\u3000", " ");
						string[] array3 = text7.Split(new char[]
						{
							' '
						});
						string text8 = "";
						for (int j = 0; j < array3.Length; j++)
						{
							string text9 = array3[j].Trim();
							if (text9.Length > 0)
							{
								string text10 = text8;
								text8 = string.Concat(new string[]
								{
									text10,
									(text8.Length > 0) ? " and " : "",
									"(name like '%",
									text9,
									"%')"
								});
							}
						}
						if (text8.Length > 0)
						{
							string text11 = text6;
							text6 = string.Concat(new string[]
							{
								text11,
								(text6.Length > 0) ? " or " : "",
								"(",
								text8,
								")"
							});
						}
					}
				}
				if (text6.Length > 0)
				{
					text4 = text4 + " and ( " + text6 + " )";
				}
			}
			oleDbCommand.CommandText = text4;
			DataSet dataSet = dataBase.ExecuteCmd4DataSet(oleDbCommand, "goods");
			dataSet.Tables[0].DefaultView.AllowNew = false;
			this.dgGoods.TableStyles.Clear();
			this.dgGoods.DataSource = dataSet.Tables[0];
			DataGridTableStyle dataGridTableStyle = new DataGridTableStyle();
			dataGridTableStyle.MappingName = dataSet.Tables[0].TableName;
			dataGridTableStyle.RowHeadersVisible = false;
			this.dgGoods.TableStyles.Add(dataGridTableStyle);
			this.dgGoods.TableStyles[0].GridColumnStyles.Clear();
			DataGridBoolColumn dataGridBoolColumn = new DataGridBoolColumn();
			dataGridBoolColumn.MappingName = "选择";
			dataGridBoolColumn.Width = 50;
			dataGridBoolColumn.TrueValue = 1;
			dataGridBoolColumn.FalseValue = 0;
			dataGridBoolColumn.AllowNull = false;
			dataGridBoolColumn.HeaderText = "选择";
			dataGridBoolColumn.ReadOnly = false;
			this.dgGoods.TableStyles[0].GridColumnStyles.Add(dataGridBoolColumn);
			DataGridTextBoxColumn dataGridTextBoxColumn = new DataGridTextBoxColumn();
			dataGridTextBoxColumn.MappingName = "url";
			dataGridTextBoxColumn.HeaderText = "url";
			dataGridTextBoxColumn.ReadOnly = true;
			dataGridTextBoxColumn.Width = 0;
			dataGridTextBoxColumn.NullText = "0";
			this.dgGoods.TableStyles[0].GridColumnStyles.Add(dataGridTextBoxColumn);
			DataGridTextBoxColumn dataGridTextBoxColumn2 = new DataGridTextBoxColumn();
			dataGridTextBoxColumn2.MappingName = "商品名称";
			dataGridTextBoxColumn2.HeaderText = "商品名称";
			dataGridTextBoxColumn2.ReadOnly = true;
			dataGridTextBoxColumn2.Width = 289;
			dataGridTextBoxColumn2.TextBox.Click += new EventHandler(this.method_88);
			this.dgGoods.TableStyles[0].GridColumnStyles.Add(dataGridTextBoxColumn2);
			this.WriteLog(((text5.Length > 0) ? ("按关键字[" + text5 + "]") : "") + "载入商品列表成功,数量:" + dataSet.Tables[0].Rows.Count.ToString(), 1);
			this.tabCtl.SelectedTab = this.tabSet;
		}
		private int method_44(int int_10, string string_12, string string_13, string string_14, string string_15, int int_11)
		{
			if (int_11 > 1)
			{
				string_15 = string_15.Replace("-1-", "-" + int_11.ToString() + "-");
			}
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_15);
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string text = streamReader.ReadToEnd();
			streamReader.Close();
			string text2 = text.Substring(text.IndexOf("pageCount") + 11, 16);
			text2 = text2.Substring(0, text2.IndexOf("\""));
			text = text.Substring(text.IndexOf("panel"));
			int i = text.IndexOf("commodityId=");
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			int num = 0;
			while (i > 0)
			{
				text = text.Substring(i + 13);
				string text3 = text.Substring(0, 32);
				text = text.Substring(text.IndexOf("title=") + 7);
				string text4 = text.Substring(0, text.IndexOf("\"")).Trim();
				oleDbCommand.CommandText = string.Concat(new string[]
				{
					"insert into [goods]([shop],[cat],[subcat],[name],[url]) values('",
					string_12,
					"','",
					string_13,
					"','",
					string_14,
					"','",
					text4,
					"','",
					text3,
					"')"
				});
				dataBase.ExecuteCmdNonQuery(oleDbCommand);
				i = text.IndexOf("commodityId=");
				num++;
			}
			this.WriteLog(string.Concat(new string[]
			{
				"[",
				string_12,
				"]>[",
				string_14,
				"]第",
				int_11.ToString(),
				"页找到",
				num.ToString(),
				"个宝贝"
			}), 1);
			return int.Parse(text2);
		}
		private void method_45(int int_10, string string_12, string string_13, string string_14, string string_15, int int_11)
		{
			string_15 = string_15.Replace("\n\r", "").Replace("\n", "").Replace("\r", "");
			object value = Missing.Value;
			this.axWebBrowser_0.Navigate("about:_blank", ref value, ref value, ref value, ref value);
			for (int i = 0; i < 400; i++)
			{
				this.ThreadSleep();
			}
			string text = string_15 + "&_input_charset=gb2312";
			try
			{
				this.axWebBrowser_0.Navigate(text, ref value, ref value, ref value, ref value);
			}
			catch (Exception ex)
			{
				this.WriteLog(text + "打开页面出错:" + ex.Message, 1);
				return;
			}
			int num = 2;
			string text2;
			while (true)
			{
				text2 = "";
				while (true)
				{
					this.ThreadSleep();
					if (this.bStopCurAction)
					{
						goto Block_4;
					}
					try
					{
						for (int j = 0; j < 300; j++)
						{
							this.ThreadSleep();
						}
						IHTMLDocument2 iHTMLDocument = (IHTMLDocument2)this.axWebBrowser_0.Document;
						IHTMLBodyElement iHTMLBodyElement = (IHTMLBodyElement)iHTMLDocument.body;
						IHTMLTxtRange iHTMLTxtRange = iHTMLBodyElement.createTextRange();
						string innerHTML = iHTMLDocument.body.innerHTML;
						if (innerHTML.IndexOf("为保障安全，请确认密码") > 0)
						{
							this.WriteLog("淘宝提示：为保障安全，请确认密码，请在网页里输入密码并点确认", 1);
							this.tabCtl.SelectedTab = this.tabWeb;
							try
							{
								while (true)
								{
									IL_12E:
									iHTMLDocument = (IHTMLDocument2)this.axWebBrowser_0.Document;
									innerHTML = iHTMLDocument.body.innerHTML;
									if (innerHTML.IndexOf("为保障安全，请确认密码") <= 0)
									{
										break;
									}
									for (int k = 0; k < 500; k++)
									{
										this.ThreadSleep();
									}
								}
								break;
							}
							catch (Exception)
							{
								for (int l = 0; l < 500; l++)
								{
									this.ThreadSleep();
								}
								//goto IL_12E;
							}
						}
						if (innerHTML.IndexOf("请输入您在下图中看到的内容") > 0)
						{
							this.WriteLog("淘宝提示：请输入您在下图中看到的内容，请在网页里输入验证码并点确认", 1);
							this.tabCtl.SelectedTab = this.tabWeb;
							try
							{
								while (true)
								{
									IL_1CA:
									iHTMLDocument = (IHTMLDocument2)this.axWebBrowser_0.Document;
									innerHTML = iHTMLDocument.body.innerHTML;
									if (innerHTML.IndexOf("请输入您在下图中看到的内容") <= 0)
									{
										break;
									}
									for (int m = 0; m < 500; m++)
									{
										this.ThreadSleep();
									}
								}
								break;
							}
							catch (Exception)
							{
								for (int n = 0; n < 500; n++)
								{
									this.ThreadSleep();
								}
								//goto IL_1CA;
							}
						}
						if (!iHTMLTxtRange.findText("所有宝贝", 1, 0) && !iHTMLTxtRange.findText("用手机逛本店", 1, 0) && !iHTMLTxtRange.findText("收藏店铺", 1, 0) && !iHTMLTxtRange.findText("个符合条件的商品", 1, 0) && !iHTMLTxtRange.findText("阿里巴巴", 1, 0) && !iHTMLTxtRange.findText("搜索", 1, 0))
						{
							text2 = iHTMLDocument.body.innerHTML;
							if (text2.IndexOf("所有宝贝") > 0 || text2.IndexOf("收藏店铺") > 0 || text2.IndexOf("个符合条件的商品") > 0 || text2.IndexOf("阿里巴巴") > 0 || text2.IndexOf("搜索") > 0)
							{
								text2 = iHTMLDocument.body.innerHTML;
								goto IL_394;
							}
						}
						else
						{
							text2 = iHTMLDocument.body.innerHTML;
							if (num > 0 && text2.IndexOf("很抱歉，搜索到“<em>0</em>”个宝贝") > 0)
							{
								this.axWebBrowser_0.Refresh();
								for (int num2 = 0; num2 < 400; num2++)
								{
									this.ThreadSleep();
								}
								num--;
								break;
							}
							goto IL_394;
						}
					}
					catch (Exception)
					{
						this.ThreadSleep();
					}
				}
			}
			Block_4:
			this.WriteLog("成功停止当前操作", 1);
			return;
			IL_394:
			StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\pctw.txt", false);
			streamWriter.WriteLine(string_15);
			streamWriter.WriteLine(text2);
			streamWriter.Close();
			string text3 = "";
			int num3 = text2.IndexOf(">下一页<");
			if (num3 > 0)
			{
				string text4 = text2.Substring(0, num3);
				text4 = text4.Substring(text4.LastIndexOf("<"));
				num3 = text4.IndexOf("http://");
				if (num3 > 0)
				{
					text4 = text4.Substring(num3);
					text3 = text4.Substring(0, text4.IndexOf("\"")).Replace("&amp;", "&");
				}
			}
			num3 = text2.IndexOf("class=item-name");
			if (num3 < 0)
			{
				num3 = text2.IndexOf("class=\"item-name");
			}
			if (num3 < 0)
			{
				num3 = text2.IndexOf("class=item>");
			}
			int num4 = 0;
			int num5 = 0;
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			while (num3 > 0)
			{
				text2 = text2.Substring(num3);
				text2 = text2.Substring(text2.IndexOf("http://"));
				string text5 = text2.Substring(0, text2.IndexOf("\"")).Replace("&amp;", "&");
				text5 = text5.TrimEnd(new char[]
				{
					'&'
				});
				string text6 = "";
				text2 = text2.Substring(text2.IndexOf(">") + 1);
				text6 = text2.Substring(0, text2.IndexOf("<")).Trim().Replace("'", "''").Replace("\"", "").Replace("&lt;", "<").Replace("&gt;", ">");
				if (text6.Length < 1)
				{
					text2 = text2.Substring(text2.IndexOf("class=permalink"));
					text2 = text2.Substring(text2.IndexOf(">") + 1);
					text6 = text2.Substring(0, text2.IndexOf("<")).Trim().Replace("'", "''").Replace("\"", "").Replace("&lt;", "<").Replace("&gt;", ">");
				}
				int num6 = text5.IndexOf("&rn=");
				if (num6 > 0)
				{
					string text7 = text5.Substring(0, num6);
					text5 = text5.Substring(num6 + 1);
					num6 = text5.IndexOf("&");
					if (num6 > 0)
					{
						text7 += text5.Substring(num6);
					}
					text5 = text7;
				}
				oleDbCommand.CommandText = "select [url] from [goods] where [url]='" + text5 + "'";
				dataBase.Open();
				OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
				if (oleDbDataReader.Read())
				{
					num5++;
					oleDbDataReader.Close();
					dataBase.Close();
				}
				else
				{
					oleDbDataReader.Close();
					dataBase.Close();
					oleDbCommand.CommandText = string.Concat(new string[]
					{
						"insert into [goods]([shop],[cat],[subcat],[name],[url]) values('",
						string_12,
						"','",
						string_13,
						"','",
						string_14,
						"','",
						text6,
						"','",
						text5,
						"')"
					});
					try
					{
						dataBase.ExecuteCmdNonQuery(oleDbCommand);
						goto IL_799;
					}
					catch (Exception ex2)
					{
						if (ex2.Message.IndexOf("创建重复") > 0)
						{
							this.WriteLog("商品[" + text6 + "]已存在" + text5, 1);
						}
						else
						{
							this.WriteLog(ex2.Message, 1);
						}
						goto IL_799;
					}
					goto IL_75D;
					IL_799:
					num4++;
				}
				IL_75D:
				num3 = text2.IndexOf("class=item-name");
				if (num3 < 0)
				{
					num3 = text2.IndexOf("class=\"item-name");
				}
				if (num3 < 0)
				{
					num3 = text2.IndexOf("class=item>");
				}
			}
			this.WriteLog(string.Concat(new string[]
			{
				"[",
				string_12,
				"]>[",
				string_13,
				">",
				string_14,
				"]第",
				int_11.ToString(),
				"页找到",
				num4.ToString(),
				"个新宝贝.",
				(num5 > 0) ? (num5.ToString() + "个宝贝已存在,为避免重复不再添加") : ""
			}), 1);
			if (text3.Length > 0)
			{
				this.method_45(int_10, string_12, string_13, string_14, text3, int_11 + 1);
			}
		}
		private bool method_46(string string_12)
		{
			return string_12.IndexOf("shop60043851.taobao.com") > 0;
		}
		private void method_47(int int_10, string string_12, string string_13, string string_14, string string_15, int int_11)
		{
			string_15 = string_15.Replace("\n\r", "").Replace("\n", "").Replace("\r", "");
			int num = string_15.IndexOf("#");
			if (num > 0)
			{
				string_15 = string_15.Substring(0, num);
			}
			this.WriteLog(string_15, 1);
			int num2 = 0;
			int num3 = 2;
			string text = "";
			int num4 = 20;
			try
			{
				while (!this.bStopCurAction)
				{
					Thread.Sleep(1000);
					Application.DoEvents();
					string text2 = string_15;
					string text3 = "";
					if (text2.IndexOf("htm?checkedRange=true") > 0)
					{
						text3 = string_15;
						DateTime dateTime = new DateTime(1970, 1, 1);
						string str = ((DateTime.Now.Ticks - dateTime.Ticks) / 10000L).ToString();
						text2 = text2 + "&t=" + str;
					}
					if (text3.Length > 0)
					{
						text = this.method_15(text2, text3).Replace("'", "\"");
					}
					else
					{
						text = this.method_14(text2).Replace("'", "\"");
					}
					if (text.IndexOf("个符合条件的商品") < 0 && num4 > 0 && text2.IndexOf("/search.htm") > 0)
					{
						num4--;
					}
					else
					{
						num4 = 20;
						StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\catgoods.txt", false, Encoding.Default);
						streamWriter.Write(text);
						streamWriter.Close();
						if (!this.method_46(string_15) && text.IndexOf("共搜索到<span> 0 </span>个符合条件的商品") <= 0 && !this.ckLogin.Checked && (text.IndexOf("共搜索到") >= 0 || text.IndexOf("下一页") >= 0))
						{
							text = text.Replace("'", "\"");
							num2 = 1;
							int i = text.LastIndexOf("下一页<");
							if (i < 1)
							{
								i = text.LastIndexOf("下一页</a>");
							}
							num2 = 2;
							string text4 = "";
							if (i >= 20)
							{
								num2 = 3;
								text4 = text.Substring(0, i);
								text4 = text4.Substring(text4.LastIndexOf("上一页"));
								num2 = 4;
								if (text4.IndexOf("page-end") <= 0 && text4.IndexOf("class=\"disable") <= 0)
								{
									if (text4.IndexOf("next") > 0)
									{
										i = text4.LastIndexOf("http://");
										if (i > 0)
										{
											num2 = 5;
											text4 = text4.Substring(i);
											num2 = 6;
											text4 = text4.Substring(0, text4.IndexOf("\"")).Replace("\n", "").Replace("\r", "").Replace("&amp;", "&");
											num2 = 7;
										}
									}
									else
									{
										text4 = "";
									}
								}
								else
								{
									text4 = "";
								}
							}
							num2 = 8;
							i = text.IndexOf("<span>排序：</span>");
							if (i < 0)
							{
								num3--;
								if (num3 >= 0)
								{
									continue;
								}
							}
							if (i > 0)
							{
								text = text.Substring(i);
							}
							num2 = 9;
							i = text.IndexOf("shop-list");
							if (i < 1)
							{
								i = text.IndexOf("<dd class=\"detail") - 5;
							}
							if (i < 1)
							{
								i = text.IndexOf("title=\"下一页");
							}
							if (i < 1)
							{
								i = text.IndexOf(">下一页<");
							}
							if (i < 1)
							{
								this.WriteLog(string.Concat(new string[]
								{
									"[",
									string_12,
									"]>[",
									string_13,
									">",
									string_14,
									"]第",
									int_11.ToString(),
									"页找不到宝贝"
								}), 1);
								break;
							}
							text = text.Substring(i + 2);
							num2 = 10;
							i = text.IndexOf(">下一页<");
							if (i < 0)
							{
								i = text.IndexOf("</ul>");
							}
							text = text.Substring(0, i);
							num2 = 11;
							i = text.IndexOf("<dd class=\"detail");
							if (i < 0)
							{
								i = text.IndexOf("<li");
							}
							if (i < 0)
							{
								i = text.IndexOf("<dl");
							}
							DataBase dataBase = new DataBase();
							OleDbCommand oleDbCommand = new OleDbCommand();
							int num5 = 0;
							int num6 = 0;
							Thread.Sleep(1000);
							Application.DoEvents();
							while (i > 0)
							{
								if (this.bStopCurAction)
								{
									return;
								}
								num2 = 12;
								text = text.Substring(i);
								int num7 = text.IndexOf("class=\"desc");
								if (num7 < 0)
								{
									num7 = text.IndexOf("class=\"detail");
								}
								num2 = 13;
								if (num7 > 0)
								{
									text = text.Substring(num7);
								}
								num2 = 14;
								num7 = text.IndexOf("http://item");
								if (num7 < 0)
								{
									num7 = text.IndexOf("http://detail");
								}
								if (num7 < 0)
								{
									num7 = text.IndexOf("http://");
								}
								text = text.Substring(num7);
								string text5 = text.Substring(0, text.IndexOf("\""));
								text5 = text5.TrimEnd(new char[]
								{
									'&'
								});
								num2 = 15;
								text = text.Substring(text.IndexOf(">") + 1);
								string text6 = text.Substring(0, text.IndexOf("</a>")).Trim().Replace("'", "''").Replace("\"", "").Replace("&lt;", "<").Replace("&gt;", ">");
								int num8 = text5.IndexOf("&rn=");
								if (num8 > 0)
								{
									string text7 = text5.Substring(0, num8);
									text5 = text5.Substring(num8 + 1);
									num8 = text5.IndexOf("&");
									if (num8 > 0)
									{
										text7 += text5.Substring(num8);
									}
									text5 = text7;
								}
								oleDbCommand.CommandText = "select [url] from [goods] where [url]='" + text5 + "'";
								dataBase.Open();
								OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
								if (oleDbDataReader.Read())
								{
									num6++;
									oleDbDataReader.Close();
									dataBase.Close();
								}
								else
								{
									oleDbDataReader.Close();
									dataBase.Close();
									oleDbCommand.CommandText = string.Concat(new string[]
									{
										"insert into [goods]([shop],[cat],[subcat],[name],[url]) values('",
										string_12,
										"','",
										string_13,
										"','",
										string_14,
										"','",
										text6,
										"','",
										text5,
										"')"
									});
									try
									{
										dataBase.ExecuteCmdNonQuery(oleDbCommand);
										goto IL_716;
									}
									catch (Exception ex)
									{
										if (ex.Message.IndexOf("创建重复") > 0)
										{
											this.WriteLog("商品[" + text6 + "]已存在" + text5, 1);
										}
										else
										{
											this.WriteLog(ex.Message, 1);
										}
										goto IL_716;
									}
									goto IL_6DD;
									IL_716:
									num5++;
								}
								IL_6DD:
								i = text.IndexOf("<dd class=\"detail");
								if (i < 0)
								{
									i = text.IndexOf("<li");
								}
								if (i < 0)
								{
									i = text.IndexOf("<dl");
								}
							}
							this.WriteLog(string.Concat(new string[]
							{
								"[",
								string_12,
								"]>[",
								string_13,
								">",
								string_14,
								"]第",
								int_11.ToString(),
								"页找到",
								num5.ToString(),
								"个新宝贝.",
								(num6 > 0) ? (num6.ToString() + "个宝贝已存在,为避免重复不再添加") : ""
							}), 1);
							Thread.Sleep(500);
							Application.DoEvents();
							Thread.Sleep(500);
							Application.DoEvents();
							if (text4.Length > 2)
							{
								if (!this.bStopCurAction)
								{
									int_11++;
									Thread.Sleep(500);
									Application.DoEvents();
									Thread.Sleep(500);
									Application.DoEvents();
									this.method_47(int_10, string_12, string_13, string_14, text4, int_11);
									Thread.Sleep(500);
									Application.DoEvents();
								}
							}
							break;
						}
						else
						{
							if (!this.method_46(string_15) && text.IndexOf("很抱歉，搜索到“<em>0</em>”个宝贝") <= 0 && !this.ckLogin.Checked && (text.IndexOf("共搜索到") >= 0 || text.IndexOf("下一页") >= 0))
							{
								this.WriteLog(string.Concat(new string[]
								{
									"[",
									string_12,
									"]>[",
									string_13,
									">",
									string_14,
									"]第",
									int_11.ToString(),
									"页找不到宝贝"
								}), 1);
								break;
							}
							this.WriteLog("分类[" + string_13 + "]从协议版读取不到宝贝，正在尝试从网页版读取", 1);
							if (this.ckLogin.Checked)
							{
								this.method_30();
							}
							this.method_45(int_10, string_12, string_13, string_14, string_15, int_11);
							break;
						}
					}
				}
			}
			catch (Exception ex2)
			{
				this.WriteLog(num2.ToString() + ex2.Message, 1);
				StreamWriter streamWriter2 = new StreamWriter(Application.StartupPath + "\\PCT.log", false);
				streamWriter2.WriteLine(text);
				streamWriter2.Close();
			}
		}
		private void btnSelAll_Click(object sender, EventArgs e)
		{
			if (!this.VerifyRegCode())
			{
				this.ShowNoRegMessage();
			}
			if (this.dgGoods.DataSource != null)
			{
				for (int i = 0; i < ((DataTable)this.dgGoods.DataSource).Rows.Count; i++)
				{
					((DataTable)this.dgGoods.DataSource).Rows[i][0] = 1;
				}
				return;
			}
			this.WriteLog("商品未载入不能做选择操作", 1);
		}
		private void btnSelNo_Click(object sender, EventArgs e)
		{
			if (!this.VerifyRegCode())
			{
				this.ShowNoRegMessage();
			}
			if (this.dgGoods.DataSource != null)
			{
				for (int i = 0; i < ((DataTable)this.dgGoods.DataSource).Rows.Count; i++)
				{
					((DataTable)this.dgGoods.DataSource).Rows[i][0] = 0;
				}
				return;
			}
			this.WriteLog("商品未载入不能做选择操作", 1);
		}
		private void btnSelRes_Click(object sender, EventArgs e)
		{
			if (!this.VerifyRegCode())
			{
				this.ShowNoRegMessage();
			}
			if (this.dgGoods.DataSource != null)
			{
				for (int i = 0; i < ((DataTable)this.dgGoods.DataSource).Rows.Count; i++)
				{
					((DataTable)this.dgGoods.DataSource).Rows[i][0] = ((int)((DataTable)this.dgGoods.DataSource).Rows[i][0] + 1) % 2;
				}
				return;
			}
			this.WriteLog("商品未载入不能做选择操作", 1);
		}
		public string GB2ASCII(string str)
		{
			return Encoding.ASCII.GetString(Encoding.GetEncoding("GB2312").GetBytes(str));
		}
		private void method_48()
		{
			while (this.int_9 > 0)
			{
				Thread.Sleep(0);
			}
			string address = this.string_9;
			string text = this.string_10;
			if (this.ckOnlyPic.Checked)
			{
				text = text.Replace(".tbi", ".jpg");
			}
			try
			{
				WebClient webClient = new WebClient();
				webClient.DownloadFile(address, text);
				this.int_9 = 2;
			}
			catch (Exception)
			{
				this.int_9 = 3;
			}
		}
		private void method_49()
		{
			while (this.int_9 > 0)
			{
				Thread.Sleep(0);
			}
			string text = this.string_9;
			string text2 = this.string_10;
			if (this.ckOnlyPic.Checked)
			{
				text2 = text2.Replace(".tbi", ".jpg");
			}
			string str = this.string_11;
			int num = 0;
			int num2 = 1;
			if (text.IndexOf("/http://") < 0 && text.ToLower().IndexOf("cdn.com/") >= 0)
			{
				text = "http://img.taobaocdn.com/bao/uploaded/" + text;
			}
			try
			{
				IL_77:
				new CookieContainer();
				HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(text);
				if (text.IndexOf("t.cn") > 0)
				{
					httpWebRequest.AllowAutoRedirect = true;
				}
				httpWebRequest.CookieContainer = this.cookie;
				httpWebRequest.Timeout = 20000;
				httpWebRequest.ReadWriteTimeout = 45000;
				httpWebRequest.Referer = str + "&rn=" + DateTime.Now.Ticks.ToString();
				num = 1;
				httpWebRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" + DateTime.Now.Ticks.ToString();
				httpWebRequest.KeepAlive = true;
				HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
				num = 2;
				if (httpWebResponse.ContentType.ToString().ToLower().IndexOf("gif") >= 0)
				{
					httpWebResponse.Close();
					text2 = text2.Replace(".jpg", ".gif");
					this.string_10 = text2;
				}
				num = 3;
				num = 31;
				Bitmap bitmap = new Bitmap(httpWebResponse.GetResponseStream());
				num = 32;
				try
				{
					Graphics graphics = Graphics.FromImage(bitmap);
					num = 33;
					if (!this.bool_4 && text2.IndexOf(".tbi") < 0)
					{
						num = 35;
						graphics.InterpolationMode = InterpolationMode.Low;
						graphics.SmoothingMode = SmoothingMode.HighSpeed;
						num = 5;
					}
					else
					{
						num = 34;
						graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
						graphics.CompositingQuality = CompositingQuality.HighQuality;
						graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
						graphics.SmoothingMode = SmoothingMode.HighQuality;
						num = 4;
					}
					if (text2.ToLower().IndexOf(".tbi") >= 0 && (this.int_3 == 1 || this.int_3 == 2))
					{
						for (int i = 0; i < bitmap.Width; i += 6)
						{
							for (int j = 0; j < bitmap.Height; j += 6)
							{
								Random random = new Random((int)DateTime.Now.Ticks);
								Color pixel = bitmap.GetPixel(i, j);
								int num3 = (int)pixel.R;
								int num4 = (int)pixel.G;
								int num5 = (int)pixel.B;
								if (num3 < 2)
								{
									num3 += random.Next(1, 2);
								}
								else
								{
									num3 -= random.Next(1, 2);
								}
								if (num4 < 2)
								{
									num4 += random.Next(1, 2);
								}
								else
								{
									num4 -= random.Next(1, 2);
								}
								if (num5 < 2)
								{
									num5 += random.Next(1, 2);
								}
								else
								{
									num5 -= random.Next(1, 2);
								}
								Color color = Color.FromArgb(num3, num4, num5);
								bitmap.SetPixel(i, j, color);
							}
						}
					}
					num = 8;
					if (text2.ToLower().IndexOf(".gif") >= 0)
					{
						bitmap.Save(text2, ImageFormat.Gif);
					}
					else
					{
						bitmap.Save(text2, ImageFormat.Jpeg);
					}
					num = 9;
					FileInfo fileInfo = new FileInfo(text2);
					long num6 = fileInfo.Length / 1024L;
					if (num6 / 1024L >= 3L && (text.ToLower().IndexOf(".yupoo.com") > 0 || text.ToLower().IndexOf(".myzcm.net") > 0))
					{
						this.int_9 = 88;
						return;
					}
					if (text2.ToLower().IndexOf(".tbi") > 0)
					{
						int num7 = 300;
						int height = bitmap.Height;
						int width = bitmap.Width;
						int num8 = 0;
						if (bitmap.Width >= 300)
						{
							if (num8 != 1)
							{
								if (bitmap.Height < 500)
								{
									height = (int)((double)bitmap.Height * 1.2);
									width = (int)((double)bitmap.Width * 1.2);
									goto IL_42A;
								}
								goto IL_42A;
							}
						}
						height = bitmap.Height * num7 / bitmap.Width;
						width = num7;
						IL_42A:
						Bitmap bitmap2 = new Bitmap(width, height);
						graphics = Graphics.FromImage(bitmap2);
						graphics.InterpolationMode = InterpolationMode.High;
						graphics.SmoothingMode = SmoothingMode.HighQuality;
						graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
						graphics.CompositingQuality = CompositingQuality.HighQuality;
						graphics.DrawImage(bitmap, new Rectangle(0, 0, width, height), new Rectangle(0, 0, bitmap.Width, bitmap.Height), GraphicsUnit.Pixel);
						if (this.int_3 == 1)
						{
							bitmap2.SetResolution(96f, 96f);
							bitmap2.Save(text2, ImageFormat.Jpeg);
						}
						else
						{
							if (text.EndsWith(".png"))
							{
								bitmap2.Save(text2, ImageFormat.Png);
							}
							else
							{
								if (num8 == 1)
								{
									bitmap2.Save(text2, ImageFormat.Png);
								}
								else
								{
									bitmap2.Save(text2, ImageFormat.Jpeg);
								}
							}
							fileInfo = new FileInfo(text2);
							num6 = fileInfo.Length / 1024L;
						}
						bitmap2.Dispose();
					}
					bitmap.Dispose();
					httpWebResponse.Close();
					graphics.Dispose();
				}
				catch (Exception)
				{
					try
					{
						num = 10;
						Bitmap bitmap3 = new Bitmap(bitmap.Width, bitmap.Height);
						bitmap3.SetResolution(bitmap.HorizontalResolution, bitmap.VerticalResolution);
						Graphics graphics2 = Graphics.FromImage(bitmap3);
						if (this.bool_4)
						{
							graphics2.InterpolationMode = InterpolationMode.HighQualityBicubic;
							graphics2.CompositingQuality = CompositingQuality.HighQuality;
							graphics2.SmoothingMode = SmoothingMode.HighQuality;
						}
						else
						{
							graphics2.InterpolationMode = InterpolationMode.Low;
							graphics2.SmoothingMode = SmoothingMode.HighSpeed;
						}
						num = 11;
						graphics2.DrawImage(bitmap, 0, 0);
						graphics2.DrawLine(Pens.Black, new Point(bitmap.Width / 2, bitmap.Height / 2), new Point(bitmap.Width / 2, bitmap.Height / 2 + 1));
						graphics2.DrawLine(Pens.Black, new Point(0, 0), new Point(0, 1));
						num = 12;
						if (text2.ToLower().IndexOf(".gif") >= 0)
						{
							bitmap3.Save(text2, ImageFormat.Gif);
						}
						else
						{
							bitmap3.Save(text2, ImageFormat.Jpeg);
						}
						httpWebResponse.Close();
						graphics2.Dispose();
					}
					catch (Exception ex)
					{
						throw ex;
					}
				}
				this.int_9 = 2;
			}
			catch (Exception ex2)
			{
				if (num2 > 0)
				{
					text = text.Replace("http://img.taobaocdn.com/bao/uploaded/http://", "http://");
					num2--;
					//goto IL_77;
				}
				if (num != 31)
				{
					this.int_9 = 0;
					Thread thread = new Thread(new ThreadStart(this.method_48));
					thread.Start();
					while (this.int_9 == 0)
					{
						Application.DoEvents();
						Thread.Sleep(10);
					}
				}
				if (ex2.Message.IndexOf("404") >= 0)
				{
					this.int_9 = 404;
				}
				else
				{
					this.int_9 = 3;
				}
			}
		}
		private string method_50(string string_12, string string_13, string string_14)
		{
			if (string_12.IndexOf("?") > 0)
			{
				string_12 = string_12 + "&t=" + DateTime.Now.Ticks.ToString();
			}
			else
			{
				string_12 = string_12 + "?t=" + DateTime.Now.Ticks.ToString();
			}
			string_13 = string_13.Replace(".png", ".jpg");
			int num = 1;
			int num2 = 1;
			int i = 2;
			if (File.Exists(string_13))
			{
				return string_13;
			}
			int num3 = -1;
			if (this.ckCompImg.Checked)
			{
				num3 = -1;
			}
			else
			{
				if (string_12.IndexOf(".gif") > 0)
				{
					num3 = 0;
				}
				else
				{
					num3 = -1;
				}
			}
			if (string_13.IndexOf(".tbi") > 0)
			{
				num3 = 0;
			}
			string result;
			try
			{
				IL_B1:
				while (i >= 0)
				{
					if (num3 != 0)
					{
						if (num3 == -1)
						{
							num3 = 0;
						}
						else
						{
							num3 = 3;
						}
						this.bool_4 = true;
						this.string_9 = string_12;
						this.string_10 = string_13;
						this.string_11 = string_14;
						this.int_9 = 0;
						Thread thread = new Thread(new ThreadStart(this.method_49));
						thread.Start();
						while (this.int_9 == 0)
						{
							Application.DoEvents();
							Thread.Sleep(10);
						}
						string_13 = this.string_10;
						if (this.int_9 != 404)
						{
							if (this.int_9 != 88)
							{
								if (this.int_9 == 3)
								{
									num3 = 0;
									i--;
									continue;
								}
								FileInfo fileInfo = new FileInfo(string_13);
								long num4 = fileInfo.Length / 1024L;
								if (num4 == 0L)
								{
									try
									{
										if (string_13.ToLower().IndexOf("gif") >= 0)
										{
											File.Copy(Application.StartupPath + "\\b.gif", string_13);
										}
										else
										{
											File.Copy(Application.StartupPath + "\\b.jpg", string_13);
										}
									}
									catch (Exception)
									{
									}
									result = string_13;
									return result;
								}
								if (num4 > 512L && num > 0)
								{
									num--;
									try
									{
										File.Delete(string_13);
									}
									catch (Exception)
									{
									}
									this.bool_4 = false;
									this.string_9 = string_12;
									this.string_10 = string_13;
									this.string_11 = string_14;
									this.int_9 = 0;
									Thread thread2 = new Thread(new ThreadStart(this.method_49));
									thread2.Start();
									while (this.int_9 == 0)
									{
										Application.DoEvents();
										Thread.Sleep(10);
									}
									string_13 = this.string_10;
									if (this.int_9 != 404)
									{
										if (this.int_9 != 88)
										{
											if (this.int_9 == 3)
											{
												i--;
												num3 = 0;
												continue;
											}
											goto IL_4CE;
										}
									}
									result = "";
									return result;
								}
								IL_4CE:
								result = string_13;
								return result;
							}
						}
						result = "";
						return result;
					}
					num3 = 1;
					this.string_9 = string_12;
					this.string_10 = string_13;
					this.int_9 = 0;
					Thread thread3 = new Thread(new ThreadStart(this.method_48));
					thread3.Start();
					while (this.int_9 == 0)
					{
						Application.DoEvents();
						Thread.Sleep(10);
					}
					if (this.int_9 == 3)
					{
						num3 = 1;
						i--;
					}
					else
					{
						num3 = 2;
						FileInfo fileInfo2 = new FileInfo(string_13);
						long num5 = fileInfo2.Length / 1024L;
						if (num5 == 0L)
						{
							try
							{
								if (string_13.ToLower().IndexOf("gif") >= 0)
								{
									File.Copy(Application.StartupPath + "\\b.gif", string_13);
								}
								else
								{
									File.Copy(Application.StartupPath + "\\b.jpg", string_13);
								}
							}
							catch (Exception)
							{
							}
							result = string_13;
							return result;
						}
						if (num5 / 1024L < 3L || (string_12.ToLower().IndexOf(".yupoo.com") <= 0 && string_12.ToLower().IndexOf(".myzcm.net") <= 0))
						{
							if ((num5 > 512L && num > 0) || this.int_9 == 3)
							{
								num--;
								try
								{
									File.Delete(string_13);
								}
								catch (Exception)
								{
								}
								this.bool_4 = false;
								this.string_9 = string_12;
								this.string_10 = string_13;
								this.string_11 = string_14;
								this.int_9 = 0;
								Thread thread4 = new Thread(new ThreadStart(this.method_49));
								thread4.Start();
								while (this.int_9 == 0)
								{
									Application.DoEvents();
									Thread.Sleep(10);
								}
								string_13 = this.string_10;
								if (this.int_9 != 404)
								{
									if (this.int_9 != 88)
									{
										if (this.int_9 == 3)
										{
											i--;
											num3 = 0;
											continue;
										}
										goto IL_46E;
									}
								}
								result = "";
								return result;
							}
							IL_46E:
							result = string_13;
							return result;
						}
						this.int_9 = 88;
						result = "";
						return result;
					}
				}
				try
				{
					if (string_13.ToLower().IndexOf("gif") >= 0)
					{
						File.Copy(Application.StartupPath + "\\b.gif", string_13);
					}
					else
					{
						File.Copy(Application.StartupPath + "\\b.jpg", string_13);
					}
				}
				catch (Exception ex)
				{
					this.WriteLog("333:" + ex.Message, 1);
				}
				result = string_13;
			}
			catch (Exception)
			{
				Thread.Sleep(1000);
				Thread.Sleep(1000);
				num2--;
				Thread.Sleep(1000);
				if (num2 >= 0)
				{
					string_13 = string_13.Replace(".jpg", ".gif");
					i--;
					//goto IL_B1;
				}
				try
				{
					if (string_13.ToLower().IndexOf("gif") >= 0)
					{
						File.Copy(Application.StartupPath + "\\b.gif", string_13);
					}
					else
					{
						File.Copy(Application.StartupPath + "\\b.jpg", string_13);
					}
				}
				catch (Exception)
				{
				}
				result = string_13;
			}
			return result;
		}
		private string method_51(string string_12, string string_13, string string_14)
		{
			int num = 1;
			int num2 = 1;
			int i = 2;
			if (File.Exists(string_13))
			{
				return string_13;
			}
			int num3 = -1;
			string result;
			try
			{
				IL_12:
				while (i >= 0)
				{
					if (num3 == 0)
					{
						num3 = 1;
						this.string_9 = string_12;
						this.string_10 = string_13;
						this.int_9 = 0;
						Thread thread = new Thread(new ThreadStart(this.method_48));
						thread.Start();
						while (this.int_9 == 0)
						{
							Application.DoEvents();
							Thread.Sleep(10);
						}
						if (this.int_9 == 3)
						{
							num2--;
							Thread.Sleep(500);
							if (num2 >= 0)
							{
								string_13 = string_13.Replace(".jpg", ".gif");
								i--;
								continue;
							}
							result = "";
							return result;
						}
						else
						{
							num3 = 2;
							FileInfo fileInfo = new FileInfo(string_13);
							long num4 = fileInfo.Length / 1024L;
							if (num4 == 0L)
							{
								result = "";
								return result;
							}
							if (num4 > 512L && num > 0)
							{
								num--;
								try
								{
									File.Delete(string_13);
								}
								catch (Exception)
								{
								}
								HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
								httpWebRequest.Timeout = 30000;
								httpWebRequest.Referer = string_14;
								HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
								if (httpWebResponse.ContentType.ToString().ToLower().IndexOf("gif") >= 0)
								{
									httpWebResponse.Close();
									string_13 = string_13.Replace(".jpg", ".gif");
									continue;
								}
								Image image = new Bitmap(httpWebResponse.GetResponseStream());
								try
								{
									Graphics graphics = Graphics.FromImage(image);
									graphics.InterpolationMode = InterpolationMode.Low;
									graphics.SmoothingMode = SmoothingMode.HighSpeed;
									graphics.DrawImage(image, 0, 0);
									graphics.DrawLine(Pens.Black, new Point(image.Width / 2, image.Height / 2), new Point(image.Width / 2, image.Height / 2 + 1));
									graphics.DrawLine(Pens.Black, new Point(0, 0), new Point(0, 1));
									image.Save(string_13);
									httpWebResponse.Close();
									i--;
									goto IL_337;
								}
								catch (Exception)
								{
									i--;
									continue;
								}
								goto IL_1FC;
							}
							IL_337:
							result = string_13;
							return result;
						}
					}
					IL_1FC:
					if (num3 == -1)
					{
						num3 = 0;
					}
					else
					{
						num3 = 3;
					}
					HttpWebRequest httpWebRequest2 = (HttpWebRequest)WebRequest.Create(string_12);
					httpWebRequest2.Timeout = 30000;
					httpWebRequest2.Referer = string_14;
					HttpWebResponse httpWebResponse2 = (HttpWebResponse)httpWebRequest2.GetResponse();
					if (num3 != 3 || httpWebResponse2.ContentType.ToString().ToLower().IndexOf("gif") < 0)
					{
						num3 = 4;
						Image image2 = new Bitmap(httpWebResponse2.GetResponseStream());
						try
						{
							Graphics graphics2 = Graphics.FromImage(image2);
							graphics2.InterpolationMode = InterpolationMode.Low;
							graphics2.SmoothingMode = SmoothingMode.HighSpeed;
							graphics2.DrawImage(image2, 0, 0);
							graphics2.DrawLine(Pens.Black, new Point(image2.Width / 2, image2.Height / 2), new Point(image2.Width / 2, image2.Height / 2 + 1));
							graphics2.DrawLine(Pens.Black, new Point(0, 0), new Point(0, 1));
							image2.Save(string_13);
							httpWebResponse2.Close();
							goto IL_33C;
						}
						catch (Exception)
						{
							num3 = 0;
							i--;
							continue;
						}
						break;
						IL_33C:
						result = string_13;
						return result;
					}
					httpWebResponse2.Close();
					string_13 = string_13.Replace(".jpg", ".gif");
				}
				result = "";
			}
			catch (Exception)
			{
				Thread.Sleep(1000);
				Thread.Sleep(1000);
				num2--;
				Thread.Sleep(1000);
				if (num2 >= 0)
				{
					string_13 = string_13.Replace(".jpg", ".gif");
					i--;
					//goto IL_12;
				}
				result = "";
			}
			return result;
		}
		private string method_52(string string_12)
		{
			if (string_12.StartsWith("北京"))
			{
				return "北京";
			}
			if (string_12.StartsWith("上海"))
			{
				return "上海";
			}
			if (string_12.StartsWith("天津"))
			{
				return "天津";
			}
			if (string_12.StartsWith("重庆"))
			{
				return "重庆";
			}
			if (string_12.StartsWith("浙江"))
			{
				return "浙江";
			}
			if (string_12.StartsWith("安徽"))
			{
				return "安徽";
			}
			if (string_12.StartsWith("福建"))
			{
				return "福建";
			}
			if (string_12.StartsWith("甘肃"))
			{
				return "甘肃";
			}
			if (string_12.StartsWith("广东"))
			{
				return "广东";
			}
			if (string_12.StartsWith("广西"))
			{
				return "广西";
			}
			if (string_12.StartsWith("贵州"))
			{
				return "贵州";
			}
			if (string_12.StartsWith("海南"))
			{
				return "海南";
			}
			if (string_12.StartsWith("河北"))
			{
				return "河北";
			}
			if (string_12.StartsWith("黑龙江"))
			{
				return "黑龙江";
			}
			if (string_12.StartsWith("河南"))
			{
				return "河南";
			}
			if (string_12.StartsWith("香港"))
			{
				return "香港";
			}
			if (string_12.StartsWith("湖北"))
			{
				return "湖北";
			}
			if (string_12.StartsWith("湖南"))
			{
				return "湖南";
			}
			if (string_12.StartsWith("江苏"))
			{
				return "江苏";
			}
			if (string_12.StartsWith("江西"))
			{
				return "江西";
			}
			if (string_12.StartsWith("吉林"))
			{
				return "吉林";
			}
			if (string_12.StartsWith("辽宁"))
			{
				return "辽宁";
			}
			if (string_12.StartsWith("澳门"))
			{
				return "澳门";
			}
			if (string_12.StartsWith("内蒙古"))
			{
				return "内蒙古";
			}
			if (string_12.StartsWith("宁夏"))
			{
				return "宁夏";
			}
			if (string_12.StartsWith("青海"))
			{
				return "青海";
			}
			if (string_12.StartsWith("山东"))
			{
				return "山东";
			}
			if (string_12.StartsWith("山西"))
			{
				return "山西";
			}
			if (string_12.StartsWith("陕西"))
			{
				return "陕西";
			}
			if (string_12.StartsWith("四川"))
			{
				return "四川";
			}
			if (string_12.StartsWith("台湾"))
			{
				return "台湾";
			}
			if (string_12.StartsWith("新疆"))
			{
				return "新疆";
			}
			if (string_12.StartsWith("西藏"))
			{
				return "西藏";
			}
			if (string_12.StartsWith("云南"))
			{
				return "云南";
			}
			if (string_12.StartsWith("海外"))
			{
				return "海外";
			}
			return "";
		}
		private bool method_53()
		{
			string text = this.txtRegCode.Text.Trim().Trim();
			Regex regex = new Regex("^[0-9A-Z]{16,}$");
			string text2 = this.Text.ToLower();
			return (text.Length > 0 && !regex.IsMatch(text)) || text2.IndexOf("破解") >= 0 || text2.IndexOf("软件站") >= 0 || text2.IndexOf("poojie") >= 0 || text2.IndexOf("seo60") >= 0 || text2.IndexOf("down60") >= 0 || text2.IndexOf("ch2007") >= 0 || text2.IndexOf("yingxiao") >= 0 || text2.IndexOf("hs958") >= 0 || text.Equals("ANGEL") || text.Equals("QQ823329421");
		}
		private bool method_54()
		{
			return this.method_55() || this.method_56();
		}
		private bool method_55()
		{
			string text = this.txtRegCode.Text.Trim().Trim();
			Regex regex = new Regex("^[0-9A-Z]{16,}$");
			string text2 = this.Text.ToLower();
			return (text.Length > 0 && !regex.IsMatch(text)) || text2.IndexOf("破解") >= 0 || text2.IndexOf("软件站") >= 0 || text2.IndexOf("poojie") >= 0 || text2.IndexOf("seo60") >= 0 || text2.IndexOf("down60") >= 0 || text2.IndexOf("ch2007") >= 0 || text2.IndexOf("yingxiao") >= 0 || text2.IndexOf("hs958") >= 0;
		}
		private bool method_56()
		{
			string text = this.txtRegCode.Text.Trim().Trim();
			Regex regex = new Regex("^[0-9A-Z]{16,}$");
			string text2 = this.Text.ToLower();
			return (text.Length > 0 && !regex.IsMatch(text)) || text2.IndexOf("破解") >= 0 || text2.IndexOf("软件站") >= 0 || text2.IndexOf("poojie") >= 0 || text2.IndexOf("seo60") >= 0 || text2.IndexOf("down60") >= 0 || text2.IndexOf("ch2007") >= 0 || text2.IndexOf("yingxiao") >= 0 || text2.IndexOf("hs958") >= 0;
		}
		private string method_57(string string_12)
		{
			string result;
			try
			{
				string text = "";
				for (int i = string_12.IndexOf("<a "); i >= 0; i = string_12.IndexOf("<a "))
				{
					text += string_12.Substring(0, i);
					string_12 = string_12.Substring(i);
					string_12 = string_12.Substring(string_12.IndexOf("</a>") + 4);
				}
				text += string_12;
				result = text;
			}
			catch (Exception)
			{
				result = string_12;
			}
			return result;
		}
		private string method_58(string string_12)
		{
			string result;
			try
			{
				string text = "";
				for (int i = string_12.IndexOf("href="); i >= 0; i = string_12.IndexOf("href="))
				{
					text += string_12.Substring(0, i + 5);
					string_12 = string_12.Substring(i + 6);
					string text2 = string_12.Substring(0, string_12.IndexOf(">"));
					if (text2.IndexOf(" ") >= 0)
					{
						string_12 = string_12.Substring(string_12.IndexOf(" "));
					}
					else
					{
						string_12 = string_12.Substring(string_12.IndexOf(">"));
					}
					text += "#";
				}
				text += string_12;
				result = text;
			}
			catch (Exception)
			{
				result = string_12;
			}
			return result;
		}
		private void btnExport_Click(object sender, EventArgs e)
		{
			this.method_60();
		}
		private string method_59(string string_12)
		{
			string_12 = string_12.Replace("id=\"\"ids-tag-m-3\"\"", "").Replace("class=\"\"ke_anchor\"\"", "").Replace("name=\"\"ids-tag-m-3\"\"", "");
			string_12 = string_12.Replace("id=\"\"ids-tag-m-5\"\"", "").Replace("name=\"\"ids-tag-m-5\"\"", "");
			string_12 = string_12.Replace("id=\"\"ids-tag-m-4\"\"", "").Replace("name=\"\"ids-tag-m-4\"\"", "");
			string_12 = string_12.Replace("id=\"\"ids-tag-m-1\"\"", "").Replace("name=\"\"ids-tag-m-1\"\"", "");
			string_12 = string_12.Replace("id=\"\"ids-tag-m-2\"\"", "").Replace("name=\"\"ids-tag-m-2\"\"", "");
			string_12 = string_12.Replace("id=\"\"ids-tag-m-6\"\"", "").Replace("name=\"\"ids-tag-m-6\"\"", "");
			return string_12;
		}
		public void TrimSellPropAliasOrNot()
		{
            //销售属性图过多出错 ture;
			if (this.ckMuchSellImg.Checked)
			{
				this.iSellPropAlias = 15;
				return;
			}
			this.iSellPropAlias = 300;
		}

        //导出
		private void method_60()
		{
			this.TrimSellPropAliasOrNot();
			this.delprop();
			int logNum = 0;
			this.bStopCurAction = false;
            //if (!this.VerifyRegCode())
            //{
            //    this.ShowNoRegMessage();
            //    return;
            //}
			if (this.dgGoods.DataSource == null)
			{
				this.WriteLog("未载入商品列表", 1);
				return;
			}
			Regex regex = new Regex("^[0-9]+(.[0-9]+)?$");
			if (!regex.IsMatch(this.txtPriceMul.Text.Trim()))
			{
				MessageBox.Show(this, "价格调整乘数系数设置有误，需为正数");
				this.txtPriceMul.Focus();
				return;
			}
            //if (this.string_8.Length < 4)
            //{
            //    this.ShowNoRegMessage();
            //    return;
            //}
            //string[] array = this.string_8[3].Split(new char[]
            //{
            //    ','
            //});

            string[] array = {"","","",""};
			int selectedGoodsCount = 0;
			int unselectedGoodsCount = 0;
			while (unselectedGoodsCount < ((DataTable)this.dgGoods.DataSource).Rows.Count && !this.bStopCurAction)
			{
				if ((int)((DataTable)this.dgGoods.DataSource).Rows[unselectedGoodsCount][0] == 1)
				{
					selectedGoodsCount++;
					break;
				}
				unselectedGoodsCount++;
			}
			if (selectedGoodsCount == 0)
			{
				this.WriteLog("未选中商品，请先选择", 1);
				return;
			}
            //if ((this.txtRegCode.Text.Trim().Length > 1 || this.Text.IndexOf("已注册") > 0 || this.Text.IndexOf("注册") < 0) && !this.NeedVerifyRegCode())
            //{
            //    string[] array2 = this.string_8[2].Split(new char[]
            //    {
            //        ','
            //    });
            //    int num4 = int.Parse(array2[0]);
            //    if (!this.txtRegCode.Text.Trim().Substring(num4 % 32, 1).Equals(array2[1]) && this.txtRegCode.Text.Trim().Length > 2)
            //    {
            //        return;
            //    }
            //    num4 = int.Parse(array2[2]);
            //    if (!this.txtRegCode.Text.Trim().Substring(num4 % 32, 1).Equals(array2[3]) && this.txtRegCode.Text.Trim().Length > 2)
            //    {
            //        return;
            //    }
            //    num4 = int.Parse(array2[4]);
            //    if (!this.txtRegCode.Text.Trim().Substring(num4 % 32, 1).Equals(array2[5]) && this.txtRegCode.Text.Trim().Length > 2)
            //    {
            //        return;
            //    }
            //}
            //if (!this.regString[0].Equals(this.GetMachineCode()) && !this.txtMachineCode.Text.Trim().Equals(this.GetMachineCode()))
            //{
            //    this.ShowNoRegMessage();
            //    return;
            //}
			this.tabCtl.SelectedTab = this.tabLog;
            //if (this.method_54())
            //{
            //    Process.Start("http://www.917e.com/soft/cracked.htm");
            //    this.ExitApp();
            //}
            //if (this.method_53())
            //{
            //    Process.Start("http://www.91585.com/soft/cracked.htm");
            //    this.ExitApp();
            //}
			SaveFileDialog saveFileDialog = new SaveFileDialog();
			saveFileDialog.Filter = "csv文件|*.csv";
			if (saveFileDialog.ShowDialog(this) == DialogResult.OK)
			{
				string fileName = saveFileDialog.FileName;
				string text = fileName.ToLower().Replace(".csv", "");
				text = text.Substring(text.LastIndexOf("\\") + 1);
				if (text.IndexOf(".") >= 0)
				{
					MessageBox.Show("导出的文件名不能有点号，如不能像这样的：10.26 ，您保存的文件路径为：" + fileName);
					return;
				}
				string directoryName = Path.GetDirectoryName(fileName);
				Encoding unicode = Encoding.Unicode;
				StreamWriter streamWriter = new StreamWriter(fileName, false, unicode);
                //导出低版本csv
				if (this.ckLowVer.Checked)
				{
					string value = "宝贝名称\t宝贝类目\t店铺类目\t新旧程度\t省\t城市\t出售方式\t宝贝价格\t加价幅度\t宝贝数量\t有效期\t运费承担\t平邮\tEMS\t快递\t付款方式\t支付宝\t发票\t保修\t自动重发\t放入仓库\t橱窗推荐\t开始时间\t心情故事\t宝贝描述\t宝贝图片\t宝贝属性\t团购价\t最小团购件数\t邮费模版ID\t会员打折\t修改时间\t上传状态\t图片状态\t返点比例\t新图片\t视频\t销售属性组合\t用户输入ID串\t用户输入名-值对\t商家编码\t销售属性别名\t代充类型\t宝贝编号\t食品专项";
					streamWriter.WriteLine(value);
				}
				else
				{
					string value = "version 1.00\ntitle\tcid\tseller_cids\tstuff_status\tlocation_state\tlocation_city\titem_type\tprice\tauction_increment\tnum\tvalid_thru\tfreight_payer\tpost_fee\tems_fee\texpress_fee\thas_invoice\thas_warranty\tapprove_status\thas_showcase\tlist_time\tdescription\tcateProps\tpostage_id\thas_discount\tmodified\tupload_fail_msg\tpicture_status\tauction_point\tpicture\tvideo\tskuProps\tinputPids\tinputValues\touter_id\tpropAlias\tauto_fill\tnum_id\tlocal_cid\tnavigation_type\tuser_name\tsyncStatus\tis_lighting_consigment\tis_xinpin\tfoodparame\tfeatures\tglobal_stock_type\tsub_stock_type\titem_size\titem_weight\tsell_promise\tcustom_design_flag\twireless_desc";
					streamWriter.WriteLine(value);
					value = "宝贝名称\t宝贝类目\t店铺类目\t新旧程度\t省\t城市\t出售方式\t宝贝价格\t加价幅度\t宝贝数量\t有效期\t运费承担\t平邮\tEMS\t快递\t发票\t保修\t放入仓库\t橱窗推荐\t开始时间\t宝贝描述\t宝贝属性\t邮费模版ID\t会员打折\t修改时间\t上传状态\t图片状态\t返点比例\t新图片\t视频\t销售属性组合\t用户输入ID串\t用户输入名-值对\t商家编码\t销售属性别名\t代充类型\t数字ID\t本地ID\t宝贝分类\t用户名称\t宝贝状态\t闪电发货\t新品\t食品专项\t尺码库\t库存类型\t库存计数\t物流体积\t物流重量\t退换货承诺\t定制工具\t无线详情";
					streamWriter.WriteLine(value);
				}
                //导出总数
				int exportedCount = 1;
				int priceAdd = 0;
				float priceMul = 1f;
				try
				{
					priceAdd = (int)this.nPriceAdd.Value;
				}
				catch (Exception)
				{
					priceAdd = 0;
				}
				try
				{
					priceMul = float.Parse(this.txtPriceMul.Text.Trim());
				}
				catch (Exception)
				{
					priceMul = 1f;
				}
				//int exportedSum = 0;
				for (int i = 0; i < ((DataTable)this.dgGoods.DataSource).Rows.Count; i++)
				{
					Application.DoEvents();
					if (this.bStopCurAction)
					{
						this.WriteLog("处理已停止，因为您点击了停止按钮", 1);
						streamWriter.Close();
						return;
					}
					if ((int)((DataTable)this.dgGoods.DataSource).Rows[i][0] == 1)
					{
                        //if (num8 % 10 == 2 && this.method_54())
                        //{
                        //    Process.Start("http://www.917e.com/soft/cracked.htm");
                        //    this.ExitApp();
                        //}
                        //if (!this.VerifyRegCode() && num8 == 2)
                        //{
                        //    streamWriter.Close();
                        //    MessageBox.Show("未注册版只能导出2个宝贝，已成功导2个宝贝，本软件将关闭，若需注册请与我们联系。");
                        //    this.ExitApp();
                        //}
                        //if (this.txtRegCode.Text.Trim().Length < 1 && num8 == 2)
                        //{
                        //    return;
                        //}
						//exportedSum++;
						//int num9_______ = 5;
						Thread.Sleep(1000);
						string foodName = ((DataTable)this.dgGoods.DataSource).Rows[i][2].ToString();
						foodName = this.specialSignReplace(foodName);
						string foodsUrl = ((DataTable)this.dgGoods.DataSource).Rows[i][1].ToString();
						string foodDetailUrl = foodsUrl;
						string foodDetailID = "";
						if (this.ckNoCopied.Checked)
						{
							try
							{
								foodDetailID = foodDetailUrl.Substring(foodDetailUrl.IndexOf("id=") + 3);
								if (foodDetailID.IndexOf("&") > 0)
								{
									foodDetailID = foodDetailID.Substring(0, foodDetailID.IndexOf("&"));
								}
								foodDetailID = foodDetailID.Trim();
								DataBase dataBase = new DataBase("copied.mdb");
								OleDbCommand cmd = new OleDbCommand("select * from goods where url='" + foodDetailID + "'");
								int hasGoodCoped = 0;
								dataBase.Open();
								OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(cmd);
								if (oleDbDataReader.Read())
								{
									hasGoodCoped = 1;
								}
								oleDbDataReader.Close();
								dataBase.Close();
								if (hasGoodCoped == 1)
								{
									this.WriteLog("您勾选了选项10“不复制已复制过的商品”且商品[" + foodDetailUrl + "]在已复制过的商品地址列表，跳过该商品", 1);
									goto IL_2ADA;
								}
							}
							catch (Exception)
							{
							}
						}
                        this.WriteLog("开始下载宝贝[" + foodName + "]" + exportedCount.ToString(), 1);
						this.cookie = new CookieContainer();
						int num11 = 1;
						while (true)
						{
							Application.DoEvents();
							try
							{
								string resutlStringLine = "";  //一行结果
								string responseString = "";
								Application.DoEvents();
								string referer;
								if (foodDetailUrl.IndexOf("tmall") > 0)
								{
									referer = "http://list.tmall.com";
								}
								else
								{
									referer = "http://www.taobao.com";
								}
								HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(foodDetailUrl);
								httpWebRequest.Referer = referer;
								HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
								Stream responseStream = httpWebResponse.GetResponseStream();
								StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
								responseString = streamReader.ReadToEnd();
								streamReader.Close();
								httpWebResponse.Close();
								string slt = responseString;
								this.WriteLog("宝贝[" + foodName + "]商品基本信息读取成功", 1);
								responseString = Form1.htmlToLower(responseString);
								string dStockStr = this.GetDStockStr(slt);
								Application.DoEvents();
								logNum++;
								string tempValueStr = "";
								string categoryID = "";
								categoryID = this.method_78(responseString);
								Application.DoEvents();
                                string stuff_status = "";
                                int num12 = responseString.IndexOf("宝贝类型：</span><em>");
								if (num12 > 0)
								{
									tempValueStr = responseString.Substring(num12 + 16, 20);
									logNum++;
									tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf("<"));
									logNum++;
									if (tempValueStr.Equals("闲置"))
									{
										stuff_status = "2";
									}
									else
									{
										if (tempValueStr.Equals("二手"))
										{
											stuff_status = "1";
										}
										else
										{
											stuff_status = "0";
										}
									}
								}
								else
								{
									stuff_status = "0";
								}
								Application.DoEvents();
								logNum++;

                                //出售方式？ 1，0 
                                string itemType= "b";
								int j = responseString.IndexOf("auction_type\" value=");
								if (j > 0)
								{
									tempValueStr = responseString.Substring(j + 21, 20);
                                    itemType = tempValueStr.Substring(0, tempValueStr.IndexOf("\""));
								}
								logNum++;
								string text12 = "";
								text12 = this.GetPrice(responseString, foodDetailUrl);
								logNum++;
								if (priceAdd == 0)
								{
									if (priceMul == 1f)
									{
										goto IL_882;
									}
								}
								try
								{
									float num13 = float.Parse(text12);
									if (num13 + (float)priceAdd > 0f)
									{
										num13 += (float)priceAdd;
									}
									text12 = (num13 * priceMul).ToString();
								}
								catch (Exception)
								{
								}
								IL_882:
								j = responseString.IndexOf("加价幅度：");
								string string_ = "0";
								logNum++;
								if (j > 0)
								{
									tempValueStr = responseString.Substring(j);
									tempValueStr = tempValueStr.Substring(tempValueStr.IndexOf("price") + 7);
									string_ = tempValueStr.Substring(0, tempValueStr.IndexOf("<")).Trim();
								}
								logNum++;
								string text13 = "2000";
								j = responseString.IndexOf("allow_quantity");
								if (j > 0)
								{
									tempValueStr = responseString.Substring(j + 23, 50);
									text13 = tempValueStr.Substring(0, tempValueStr.IndexOf("\""));
								}
								else
								{
									j = responseString.IndexOf("virtQuantity:");
									if (j > 0)
									{
										tempValueStr = responseString.Substring(j + 14);
										text13 = tempValueStr.Substring(0, tempValueStr.IndexOf("'"));
									}
								}
								text13 = this.GetDQuantity(text13, dStockStr);
								logNum++;
								string text14 = "";
								string text15 = "1";
								try
								{
									tempValueStr = responseString.Substring(responseString.IndexOf("who_pay_ship") + 21, 100);
									text15 = tempValueStr.Substring(0, tempValueStr.IndexOf("\"")).Trim();
									text14 = text15;
									if (text15.Equals("卖家承担运费"))
									{
										text15 = "2";
										j = responseString.IndexOf("运\u3000\u3000费：");
										if (j > 0)
										{
											tempValueStr = responseString.Substring(j);
											tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf("</li>"));
											if (tempValueStr.IndexOf("读取中") > 0)
											{
												text15 = "1";
											}
										}
									}
									else
									{
										text15 = "1";
									}
									logNum = 1000;
								}
								catch (Exception)
								{
								}
								logNum = 1111000;
								j = text14.IndexOf("平邮:");
								logNum = 1111001;
								string string_2 = "10";
								string string_3 = "15";
								string winTitle = "20";
								if (j > 0)
								{
									logNum = 1111002;
									text14 = text14.Substring(text14.IndexOf("平邮:") + 4);
									logNum = 1111003;
									string_2 = text14.Substring(0, text14.IndexOf("元"));
									logNum = 1111004;
									text14 = text14.Substring(text14.IndexOf("快递:") + 4);
									logNum = 1111005;
									string_3 = text14.Substring(0, text14.IndexOf("元"));
									logNum = 1111006;
									text14 = text14.Substring(text14.IndexOf("EMS:") + 5);
									logNum = 1111007;
									winTitle = text14.Substring(0, text14.IndexOf("元"));
									logNum = 1111008;
								}
								Application.DoEvents();
								logNum = 1111009;
								logNum = 1111010;
								string text16 = "";
								text16 = this.GetItemDescUrl(responseString, code.decode(array[2]));
								string text17 = "";
								logNum = 1111024;
								if (text16.Length > 2)
								{
									Application.DoEvents();
									Random random = new Random((int)DateTime.Now.Ticks);
									this.WriteLog("开始读取宝贝[" + foodName + "]的商品描述信息", 1);
									Application.DoEvents();
									try
									{
										text17 = this.method_17(text16, foodDetailUrl);
										if (text17.IndexOf("desc=") < 0)
										{
											string text18 = "";
											text17 = this.cjxGetUseCookieGzip(text16, (num11 == 1) ? (foodDetailUrl + ((random.Next(1, 2) == 2) ? ("&t=" + random.ToString()) : "")) : "", Encoding.GetEncoding("gbk"), ref text18);
											this.cookiestr = "";
										}
									}
									catch (Exception)
									{
										for (int k = 0; k < 100; k++)
										{
											Thread.Sleep(50);
											Application.DoEvents();
										}
										num11 = (num11 + 1) % 2;
										continue;
									}
									Application.DoEvents();
									try
									{
										StreamWriter streamWriter2 = new StreamWriter(Application.StartupPath + "\\desc0.txt", false, Encoding.GetEncoding("gbk"));
										streamWriter2.WriteLine(text16);
										streamWriter2.WriteLine(text17);
										streamWriter2.Close();
									}
									catch (Exception)
									{
									}
									if (text17.IndexOf("Bad Request<") > 0 || text17.IndexOf("Bad request") > 0 || text17.IndexOf(">Host Header Required<") > 0 || text17.IndexOf("HTTP/1.1 404 Not Found") >= 0)
									{
										for (int l = 0; l < 100; l++)
										{
											Thread.Sleep(50);
											Application.DoEvents();
										}
										num11 = (num11 + 1) % 2;
										this.WriteLog("读取宝贝[" + foodName + "]的商品描述信息出错，正在重试", 1);
										continue;
									}
									this.WriteLog("读取商品描述成功", 1);
									num11 = 1;
									logNum = 1111025;
									text17 = text17.Substring(text17.IndexOf("desc=") + 6);
									logNum = 1111026;
									if (text17.IndexOf("';") < 0)
									{
										StreamWriter streamWriter3 = new StreamWriter(Application.StartupPath + "log1.log", false);
										streamWriter3.WriteLine(text17);
										streamWriter3.Close();
									}
									text17 = text17.Substring(0, text17.LastIndexOf("';"));
									logNum = 1111027;
									if (responseString.IndexOf("TShop.renderDesc(desc);") > 0)
									{
										logNum = 1111028;
										int num14 = responseString.IndexOf("<div id=\"description");
										if (num14 >= 0)
										{
											logNum = 1111029;
											string text19 = responseString.Substring(0, num14);
											if (text19.Length > 28)
											{
												logNum = 1111030;
												text19 = text19.Substring(0, text19.Length - 27);
												num14 = text19.LastIndexOf("custom-area\">");
												if (num14 >= 0)
												{
													text19 = text19.Substring(num14 + 13);
													if (text17.IndexOf(">--------------------------------------------------------------------------</div>") > 0)
													{
														text17 = text17.Replace("--------------------------------------------------------------------------", text19);
													}
												}
											}
										}
									}
									logNum++;
								}
								if (this.ckDelHref.Checked)
								{
									text17 = this.method_57(text17);
								}
								else
								{
									if (this.ckDelOnlyHref.Checked)
									{
										text17 = this.method_58(text17);
									}
								}
								text17 = text17.Replace("\"", "\"\"").Replace("\r", "").Replace("\n", "").Replace("\\", "");
								logNum = 1111031;
								Application.DoEvents();
								logNum = 2000;
								j = responseString.IndexOf("J_ImgBooth");
								this.int_3 = 1;
								string text20 = "";
								string text21 = "";
								tempValueStr = fileName.Substring(fileName.LastIndexOf("\\") + 1);
								tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf("."));
								string text22 = directoryName + "\\" + tempValueStr;
								string text23 = "";
								if (j < 0)
								{
									j = responseString.IndexOf("booth pic");
									tempValueStr = responseString.Substring(j);
								}
								else
								{
									tempValueStr = responseString.Substring(j);
									tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf(">"));
								}
								if (j >= 0)
								{
									tempValueStr = tempValueStr.Substring(tempValueStr.IndexOf("src=") + 5);
									if (!tempValueStr.StartsWith("http://"))
									{
										tempValueStr = responseString.Substring(0, responseString.IndexOf("J_ImgBooth"));
										tempValueStr = tempValueStr.Substring(tempValueStr.LastIndexOf("http://"));
									}
									text23 = tempValueStr.Substring(0, tempValueStr.IndexOf("\""));
									if (text23.IndexOf("jpg_") > 0)
									{
										text23 = text23.Substring(0, text23.LastIndexOf("_"));
									}
									if (!Directory.Exists(text22))
									{
										this.WriteLog("创建图片文件夹：" + text22, 1);
										Directory.CreateDirectory(text22);
									}
									text21 = Form1.GetMD5(text23, this.string_2).ToLower();
									string text24 = text22 + "\\" + text21 + ".tbi";
									text20 = text21 + ".jpg";
									if (!this.ckPP.Checked)
									{
										text20 = text24;
									}
									logNum++;
									Application.DoEvents();
									this.int_2 = 0;
									this.method_50(text23, text24, foodDetailUrl);
									this.int_2 = 1;
									Application.DoEvents();
									logNum++;
								}
								Application.DoEvents();
								Application.DoEvents();
								this.WriteLog("开始处理商品描述图片", 1);
								text17 = this.method_86(text22, text17, foodDetailUrl);
								this.WriteLog("商品描述图片处理完成", 1);
								text17 = this.method_59(text17);
								Application.DoEvents();
								string text25 = "";
								if (this.ckLowVer.Checked)
								{
									text25 = ":0:0:|;";
								}
								else
								{
									text25 = ":1:0:|;";
								}
								j = responseString.IndexOf("<ul id=\"J_UlThumb");
								if (j > 0 && this.ckMultiPic.Checked)
								{
									tempValueStr = responseString.Substring(j);
									tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf("</ul>"));
									j = tempValueStr.IndexOf("<li ");
									int num15 = 0;
									while (j > 0)
									{
										tempValueStr = tempValueStr.Substring(j);
										tempValueStr = tempValueStr.Substring(tempValueStr.IndexOf("http://"));
										string text26 = tempValueStr.Substring(0, tempValueStr.IndexOf("\""));
										text26 = text26.Substring(0, text26.LastIndexOf("_"));
										string text27 = Form1.GetMD5(text26, this.string_2).ToLower();
										string winVersion = text22 + "\\" + text27 + ".tbi";
										Application.DoEvents();
										if (text26.Equals(text23))
										{
											j = tempValueStr.IndexOf("<li ");
										}
										else
										{
											text26 = text26.Replace("_40x40.jpg", "");
											string text28 = this.method_50(text26, winVersion, foodDetailUrl);
											Application.DoEvents();
											if (text28.Length > 0)
											{
												num15++;
												if (this.ckLowVer.Checked)
												{
													string text29 = text25;
													text25 = string.Concat(new string[]
													{
														text29,
														text27,
														":0:",
														num15.ToString(),
														":|;"
													});
												}
												else
												{
													string text29 = text25;
													text25 = string.Concat(new string[]
													{
														text29,
														text27,
														":1:",
														num15.ToString(),
														":|;"
													});
												}
												this.int_2++;
											}
											j = tempValueStr.IndexOf("<li ");
										}
									}
								}
								string text30 = this.ckStock.Checked ? "2" : "0";
								logNum++;
								responseString = responseString.Replace("<LI", "<li").Replace("</LI>", "</li>").Replace("<DIV", "<div").Replace("DIV>", "div>").Replace("<SPAN", "<span").Replace("SPAN>", "span>").Replace("<EM", "<em").Replace("EM>", "em>").Replace("VALUE=", "value=").Replace("</A>", "</a>").Replace("BACKGROUND:URL(", "background:url(");
								j = responseString.LastIndexOf("attributes-list");
								string text31 = "";
								string text32 = "";
								string text33 = "";
								string attrstr = "";
								if (j > 0)
								{
									tempValueStr = responseString.Substring(j);
									logNum++;
									j = tempValueStr.IndexOf("<li");
									if (j > 0)
									{
										tempValueStr = tempValueStr.Substring(j - 1);
									}
									tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf("</ul>"));
									logNum++;
									logNum = 10000;
									this.prop_type = 1;
									if (categoryID.Equals("1512") && responseString.IndexOf(">更多参数<") > 0)
									{
										tempValueStr = responseString.Substring(responseString.IndexOf(">包装和参数<"));
										tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf("</tbody>"));
										this.prop_type = 2;
									}
									Application.DoEvents();
									if (categoryID.Equals("50005174"))
									{
										if (foodName.IndexOf("N1100") > 0)
										{
											tempValueStr = tempValueStr.Replace("N1100", "M-6600A");
											foodName = foodName.Substring(0, foodName.Length - 11) + "TVIX M-6600A";
										}
										else
										{
											if (foodName.IndexOf("图美V9") >= 0)
											{
												tempValueStr = tempValueStr.Replace("V9", "高清王V8");
												foodName = foodName.Replace("图美", "").Replace("高清王", "").Replace("V9", "").Replace(" ", "") + "图美 高清王V8";
											}
											else
											{
												if (foodName.IndexOf("P8126S") >= 0)
												{
													tempValueStr = tempValueStr.Replace("P8126S", "P8126");
													foodName = foodName.Replace("P8126S", "P8126");
												}
												else
												{
													if (foodName.IndexOf("300B") >= 0)
													{
														tempValueStr = tempValueStr.Replace("300B", "HD300C");
														foodName = foodName.Replace("HD", "").Replace("300B", "HD300C");
													}
													else
													{
														if (foodName.IndexOf("500B") >= 0)
														{
															tempValueStr = tempValueStr.Replace("500B", "HD8A");
															foodName = foodName.Replace("HD", "").Replace("500B", "HD8A");
														}
													}
												}
											}
										}
									}
									else
									{
										if (categoryID.Equals("110216") && foodName.IndexOf("LT290W") >= 0)
										{
											tempValueStr = tempValueStr.Replace("LT290W", "LT280W").Replace("(LT290W", "LT280W");
											foodName = foodName.Replace("LT290W", "LT280W");
										}
									}
									Application.DoEvents();
									attrstr = tempValueStr;
									int int_ = (responseString.IndexOf("skuMap") >= 0) ? 1 : 0;
									Application.DoEvents();
									string[] array3 = this.method_64(tempValueStr, categoryID, int_, foodName);
									Application.DoEvents();
									Application.DoEvents();
									logNum++;
									text31 = array3[0];
									text32 = array3[2];
									text33 = array3[1];
									if (text32.Length < 1)
									{
										text33 = "";
									}
									logNum++;
								}
								string text34 = "";
								string text35 = "";
								string text36 = "0";
								string text37 = "0";
								string text38 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
								string text39 = "200";
								string text40 = "";
								string text41 = "0";
								string text42 = text21;
								string text43 = "";
								string text44 = "";
								string text45 = "";
								string text46 = "";
								string text47 = "";
								string text48 = "福建";
								string text49 = "厦门";
								j = responseString.LastIndexOf("所在地区：</span>");
								if (j > 0)
								{
									tempValueStr = responseString.Substring(j + 12);
									tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf("</li>")).Replace("<em>", "").Replace("</em>", "").Trim();
									text48 = this.method_52(tempValueStr);
									if (text48.Length < 1)
									{
										text48 = "福建";
										text49 = "厦门";
									}
									else
									{
										text49 = tempValueStr.Substring(text48.Length);
										if (text49.Length < 1)
										{
											text49 = text48;
										}
									}
								}
								else
								{
									if (responseString.IndexOf("name=\"region\"") >= 0)
									{
										tempValueStr = this.method_36(responseString, "region");
										text48 = this.method_52(tempValueStr);
										if (text48.Length < 1)
										{
											text48 = "福建";
											text49 = "厦门";
										}
										else
										{
											text49 = tempValueStr.Substring(text48.Length);
											if (text49.Length < 1)
											{
												text49 = text48;
											}
										}
									}
								}
								string text50 = "";
								Application.DoEvents();
								logNum = 3000;
								j = responseString.IndexOf("skuMap");
								this.int_3 = 2;
								try
								{
									if (j > 0 && !this.ckNoSellProp.Checked && !this.bCatNoSellProp(categoryID))
									{
										text31 = this.method_87(text31, "1627207", categoryID);
										text31 = this.method_87(text31, "1627778", categoryID);
										tempValueStr = responseString.Substring(j);
										j = tempValueStr.IndexOf("});");
										if (j < 0)
										{
											j = tempValueStr.IndexOf("</script>");
										}
										if (j < 0)
										{
											j = tempValueStr.IndexOf("var");
										}
										tempValueStr = tempValueStr.Substring(0, j);
										if (tempValueStr.IndexOf("</script>") > 0)
										{
											tempValueStr = tempValueStr.Substring(0, tempValueStr.IndexOf("</script>"));
										}
										j = tempValueStr.IndexOf("\";");
										logNum++;
										int num16 = 0;
										string text51 = "";
										string text52 = "";
										int num17 = 0;
										while (j > 0 && num17 < this.iSellPropAlias)
										{
											tempValueStr = tempValueStr.Substring(j + 2);
											string text53 = "";
											int num18 = tempValueStr.IndexOf("skuId");
											if (num18 > 0)
											{
												text53 = tempValueStr.Substring(num18 + 7);
												if (text53.Trim().StartsWith("\""))
												{
													text53 = text53.Substring(text53.IndexOf("\"") + 1);
													text53 = text53.Substring(0, text53.IndexOf("\""));
												}
												else
												{
													text53 = text53.Substring(0, text53.IndexOf(","));
												}
											}
											string text54 = tempValueStr.Substring(0, tempValueStr.IndexOf("\""));
											j = tempValueStr.IndexOf(";");
											string text55 = text54.Substring(0, j);
											string text56 = "";
											string text57 = "";
											text54 = text54.Substring(j + 1);
											if (text54.Length > 0)
											{
												int num19 = text54.IndexOf(";");
												text56 = text54.Substring(0, num19);
												text54 = text54.Substring(num19 + 1);
												if (text54.Length > 0)
												{
													text57 = text54.Substring(0, text54.LastIndexOf(";"));
												}
											}
											if (text55.IndexOf("1627207:") >= 0)
											{
												string text58 = text56;
												text56 = text55;
												text55 = text58;
											}
											if (text56.IndexOf("1627778") >= 0)
											{
												string text59 = text55;
												text55 = text56;
												text56 = text59;
											}
											tempValueStr = tempValueStr.Substring(tempValueStr.IndexOf("price") + 7);
											tempValueStr = tempValueStr.Substring(tempValueStr.IndexOf("\"") + 1);
											string text60 = tempValueStr.Substring(0, tempValueStr.IndexOf("\""));
                                            //不复制促销价格
											if (this.decimal_0 > 0m && !this.ckNoPromote.Checked)
											{
												string sellPropPriceBySkuid = this.GetSellPropPriceBySkuid(text53);
												if (sellPropPriceBySkuid.Length > 0)
												{
													text60 = sellPropPriceBySkuid;
												}
											}
											if (priceAdd != 0)
											{
												//goto IL_1B35;
											}
											if (priceMul != 1f)
											{
												goto Block_150;
											}
											Block_151:
											try
											{
												float num20 = float.Parse(text12);
												float num21 = float.Parse(text60);
												if (num21 > num20)
												{
													text12 = num21.ToString();
												}
												goto IL_22A9;
											}
											catch (Exception)
											{
												goto IL_22A9;
											}
											goto IL_1B94;
											IL_1BC4:
											string text61 = text61.Substring(0, text61.IndexOf("\""));
											if (text61.IndexOf("}") > 0)
											{
												text61 = text61.Substring(0, text61.IndexOf("}"));
											}
											Application.DoEvents();
											if (text51.IndexOf(text56) < 0)
											{
												text51 = text51 + text56 + ";";
												num12 = responseString.IndexOf("value=\"" + text56);
												if (num12 >= 0)
												{
													string text62 = responseString.Substring(num12);
													text62 = text62.Substring(0, text62.IndexOf("</a>"));
													if (this.ckSellImg.Checked && num16 < this.iSellPropAlias)
													{
														num12 = text62.IndexOf("background:url(");
														if (num12 > 0)
														{
															try
															{
																string text63 = text62.Substring(num12 + 15);
																text63 = text63.Substring(0, text63.IndexOf(")"));
																text63 = text63.Replace("_30x30", "_310x310").Replace("_310x310.jpg", "");
																string text64 = Form1.GetMD5(text63, this.string_2).ToUpper();
																string sellPropImg = text22 + "\\" + text64 + ".tbi";
																this.method_50(text63, sellPropImg, foodDetailUrl);
																this.WriteLog("正在下载销售属性图片:" + text63, 1);
																if (this.ckLowVer.Checked)
																{
																	string text29 = text50;
																	text50 = string.Concat(new string[]
																	{
																		text29,
																		text64,
																		":1:0:",
																		text56,
																		"|;"
																	});
																}
																else
																{
																	string text29 = text50;
																	text50 = string.Concat(new string[]
																	{
																		text29,
																		text64,
																		":2:0:",
																		text56,
																		"|;"
																	});
																}
																this.int_2++;
																num16++;
															}
															catch (Exception)
															{
															}
														}
													}
													string text65 = "";
													num12 = text62.IndexOf("title=");
													if (num12 >= 0)
													{
														text62 = text62.Substring(num12 + 7);
														text65 = text62.Substring(0, text62.IndexOf("\""));
													}
													else
													{
														num12 = text62.IndexOf("<span>");
														if (num12 >= 0)
														{
															text62 = text62.Substring(num12 + 6);
															text65 = text62.Substring(0, text62.IndexOf("</span>"));
														}
													}
													if (text45.IndexOf(text56) < 0 && text56.Length > 1 && text65.Length > 0)
													{
														text65 = text65.Replace("[", "【").Replace("]", "】");
														if (this.method_85(categoryID, text56, text65))
														{
															num17++;
															if (this.txtRegCode.Text.Trim().Equals("201206170022BA15DBF60C9FB70B156F2EA6F89141C43001"))
															{
																string text29 = text45;
																text45 = string.Concat(new string[]
																{
																	text29,
																	text56,
																	":",
																	text65,
																	";"
																});
															}
															else
															{
																string text29 = text45;
																text45 = string.Concat(new string[]
																{
																	text29,
																	text56,
																	":",
																	this.method_84(text65),
																	";"
																});
															}
															int num22 = text56.IndexOf(":");
															if (num22 >= 0)
															{
																string text66 = text56.Substring(0, num22);
																text56.Substring(num22 + 1);
																if (text32.IndexOf(text66) >= 0)
																{
																	text32 = text32.Replace(text66, "").Replace(",,", ",");
																	text33 = text33.Replace(text65, "").Replace(",,", ",");
																}
															}
														}
													}
												}
											}
											Application.DoEvents();
											if (text52.IndexOf(text55) < 0)
											{
												text52 = text52 + text55 + ";";
												num12 = responseString.IndexOf("value=\"" + text55);
												if (num12 >= 0)
												{
													string text67 = responseString.Substring(num12);
													text67 = text67.Substring(text67.IndexOf("<span>") + 6);
													string text68 = text67.Substring(0, text67.IndexOf("</span>"));
													if (text45.IndexOf(text55) < 0 && text55.Length > 1)
													{
														text68 = text68.Replace("[", "【").Replace("]", "】");
														if (this.method_85(categoryID, text55, text68))
														{
															string text29 = text45;
															text45 = string.Concat(new string[]
															{
																text29,
																text55,
																":",
																this.method_84(text68),
																";"
															});
															int num23 = text55.IndexOf(":");
															if (num23 >= 0)
															{
																string text69 = text55.Substring(0, num23);
																text55.Substring(num23 + 1);
																if (text32.IndexOf(text69) >= 0)
																{
																	text32 = text32.Replace(text69, "").Replace(",,", ",");
																	text33 = text33.Replace(text68, "").Replace(",,", ",");
																}
															}
														}
													}
												}
											}
											text61 = this.method_80(text61, text56, text55, dStockStr);
											string text70;
											if (text57.Length < 1)
											{
												string text29 = text43;
												text43 = string.Concat(new string[]
												{
													text29,
													text70,
													":",
													text61,
													"::",
													(text56.Length > 0) ? (text56 + ";") : "",
													(text55.Length > 0) ? (text55 + ";") : ""
												});
											}
											else
											{
												string text29 = text43;
												text43 = string.Concat(new string[]
												{
													text29,
													text70,
													":",
													text61,
													"::",
													(text55.Length > 0) ? (text55 + ";") : "",
													(text57.Length > 0) ? (text57 + ";") : "",
													(text56.Length > 0) ? (text56 + ";") : ""
												});
											}
											if (text31.IndexOf(text56) < 0)
											{
												text31 = text31 + text56 + ";";
											}
											if (text31.IndexOf(text55) < 0 && text55.Length > 1)
											{
												text31 = text31 + text55 + ";";
											}
											j = tempValueStr.IndexOf("\";");
											continue;
											IL_1B94:
											text61 = tempValueStr.Substring(tempValueStr.IndexOf("\"") + 1);
											goto IL_1BC4;
											IL_22A9:
											text70 = this.method_61(text60);
											tempValueStr = tempValueStr.Substring(tempValueStr.IndexOf("stock") + 6);
											text61 = "";
											if (tempValueStr.StartsWith(":\""))
											{
												goto IL_1B94;
											}
											text61 = tempValueStr.Substring(tempValueStr.IndexOf(":") + 1);
											goto IL_1BC4;
											Block_150:
											try
											{
												IL_1B35:
												float num24 = float.Parse(text60);
												if (num24 + (float)priceAdd > 0f)
												{
													num24 += (float)priceAdd;
												}
												text60 = (num24 * priceMul).ToString();
											}
											catch (Exception)
											{
											}
											goto Block_151;
										}
										Application.DoEvents();
										text45 = text45.TrimEnd(new char[]
										{
											';'
										});
										logNum++;
									}
								}
								catch (Exception)
								{
								}
								text45 = this.method_83(text45);
								if (text43.Length > 0)
								{
									text31 = text31.Replace("20503:2147483647;", "").Replace("1627207:2147483647;", "");
								}
								string text71 = "0";
								string text72 = "1";
								if (this.bFkfjNull(categoryID, text43, attrstr))
								{
									text72 = "";
								}
								Application.DoEvents();
								text32 = text32.TrimEnd(new char[]
								{
									';'
								}).TrimEnd(new char[]
								{
									','
								});
								text33 = text33.TrimEnd(new char[]
								{
									';'
								}).TrimEnd(new char[]
								{
									','
								});
								if (text32.IndexOf(";") > 0)
								{
									text32 = text32.Replace(";", ",");
								}
								if (!categoryID.Equals("50011988") && !categoryID.Equals("50011998"))
								{
									if (categoryID.Equals("1512"))
									{
										text45 = "";
									}
								}
								else
								{
									text43 = "";
									text45 = "";
								}
								text45 = this.DecodeHtmChar(text45);
								foodName = this.DecodeHtmChar(foodName);
								foodName = this.method_39(foodName);
								string tui = this.getTui(categoryID);
								string wireless = this.GetWireless(text17, foodDetailUrl, text22);
								if (this.ckLowVer.Checked)
								{
									string text29 = resutlStringLine;
									resutlStringLine = string.Concat(new string[]
									{
										text29,
										"\"",
										foodName.Replace("\"", "\"\""),
										"\"\t",
										categoryID,
										"\t\"\"\t",
										stuff_status,
										"\t\"",
										text48,
										"\"\t\"",
										text49,
										"\"\t\"",
										itemType,
										"\"\t",
										this.method_61(text12),
										"\t",
										this.method_61(string_),
										"\t",
										text13,
										"\t7\t",
										text15,
										"\t",
										this.method_61(string_2),
										"\t",
										this.method_61(winTitle),
										"\t",
										this.method_61(string_3),
										"\t",
										text71,
										"\t",
										text72,
										"\t0\t0\t0\t",
										text30,
										"\t0\t\"1980-01-01 00:00:00\"\t\t\"",
										text17,
										"\"\t",
										text20,
										"\t\"",
										text31,
										"\"\t",
										text34,
										"\t",
										text35,
										"\t",
										text36,
										"\t",
										text37,
										"\t\"",
										text38,
										"\"\t",
										text39,
										"\t",
										text40,
										"\t",
										text41,
										"\t\"",
										text42,
										text25,
										text50,
										"\"\t\"",
										text46,
										"\"\t\"",
										text43,
										"\"\t\"",
										text32,
										"\"\t\"",
										text33.Replace("\"", "\"\""),
										"\"\t\"",
										text44,
										"\"\t\"",
										text45.Replace("\"", "\"\""),
										"\"\t0\t\"",
										text47.Replace("\"", "\"\""),
										"\"\t",
										this.string_3
									});
								}
								else
								{
									string text29 = resutlStringLine;
									resutlStringLine = string.Concat(new string[]
									{
										text29,
										"\"",
										foodName.Replace("\"", "\"\""),
										"\"\t",
										categoryID,
										"\t\"\"\t",
										stuff_status,
										"\t\"",
										text48,
										"\"\t\"",
										text49,
										"\"\t\"",
										itemType,
										"\"\t",
										this.method_61(text12),
										"\t\"",
										this.method_61(string_),
										"\"\t",
										text13,
										"\t7\t",
										text15,
										"\t",
										this.method_61(string_2),
										"\t",
										this.method_61(winTitle),
										"\t",
										this.method_61(string_3),
										"\t0\t0\t",
										text30,
										"\t1\t\"1980-01-01 00:00:00\"\t\"",
										text17,
										"\"\t\"",
										text31,
										"\"\t0\t0\t\"",
										text38,
										"\"\t\"200\"\t\"",
										this.GetPicStatus(),
										"\"\t0\t\"",
										text42,
										text25,
										text50,
										"\"\t\"",
										text46,
										"\"\t\"",
										text43,
										"\"\t\"",
										text32,
										"\"\t\"",
										text33.Replace("\"", "\"\""),
										"\"\t\"",
										text44.Replace("\"", "\"\""),
										"\"\t\"",
										text45.Replace("\"", "\"\""),
										"\"\t0\t0\t0\t1\t\"\"\t1\t204\t66\t",
										this.string_3,
										"\t\t1613074094\t0\t\t\t",
										tui,
										"\t\t\"",
										wireless,
										"\""
									});
								}
								streamWriter.WriteLine(resutlStringLine);
								if (foodDetailID.Length > 0)
								{
									try
									{
										DataBase dataBase2 = new DataBase("copied.mdb");
										OleDbCommand cmd2 = new OleDbCommand("insert into goods(url) values('" + foodDetailID + "')");
										dataBase2.ExecuteCmdNonQuery(cmd2);
									}
									catch (Exception)
									{
									}
								}
                                exportedCount++;
								Application.DoEvents();
								break;
							}
							catch (Exception ex)
							{
								this.WriteLog(string.Concat(new string[]
								{
									"处理商品[",
									foodName,
									"][",
									foodDetailUrl,
									"]出错:",
									ex.Message,
									"trace:",
									logNum.ToString()
								}), 1);
								if (ex.Message.IndexOf("超时") > 0 || ex.Message.ToLower().IndexOf("timeout") > 0)
								{
									this.WriteLog("访问淘宝超时重新下载该商品", 1);
									//num9_______--;
									if (selectedGoodsCount <= 0)
									{
										i--;
									}
								}
								if (this.bStopCurAction)
								{
									this.WriteLog("您点了中止下载，已为你保存之前导出的数据。下次导出若不想包含本次导出的商品请勾上选项10", 1);
									streamWriter.Close();
								}
								break;
							}
						}
					}
					IL_2ADA:;
				}
				streamWriter.Close();
                exportedCount--;
                this.WriteLog(exportedCount + "导出商品成功...", 1);
			}
		}
		public bool bFkfjNull(string catid, string SellProps, string attrstr)
		{
			return (!catid.Equals("50012043") || this.ckSellImg.Checked) && (SellProps.Length > 2 || attrstr.IndexOf("系列") > 0 || attrstr.IndexOf("单品") > 0 || attrstr.IndexOf("型号") > 0 || attrstr.IndexOf("套装") > 0 || catid.Equals("50002711") || catid.Equals("50005723") || catid.Equals("290501") || catid.Equals("50012339") || catid.Equals("50010749") || catid.Equals("50016744") || attrstr.IndexOf("ISBN编号") >= 0 || catid.Equals("50016804") || catid.Equals("50016797") || catid.Equals("50016798") || catid.Equals("50009557") || catid.Equals("50009561") || catid.Equals("50019077") || catid.Equals("50007785") || catid.Equals("50008055") || catid.Equals("50007779") || catid.Equals("50015221") || catid.Equals("50005953") || catid.Equals("50016606") || catid.Equals("50016652") || catid.Equals("50012107") || catid.Equals("50012107") || catid.Equals("50014099") || catid.Equals("50012010") || catid.Equals("50016799") || catid.Equals("50010815") || catid.Equals("50009866") || catid.Equals("50016801") || catid.Equals("50009559") || catid.Equals("50009558") || catid.Equals("50016793") || catid.Equals("50016772") || catid.Equals("50016808") || catid.Equals("50009898") || catid.Equals("50016236") || catid.Equals("50016236") || catid.Equals("50012395") || catid.Equals("50016795") || catid.Equals("50016796") || catid.Equals("50010513") || catid.Equals("50008438") || catid.Equals("50008056") || catid.Equals("50009838") || catid.Equals("50015907") || catid.Equals("50017575") || catid.Equals("50017774") || catid.Equals("50009827") || catid.Equals("50003023") || catid.Equals("50004417") || catid.Equals("50009339") || catid.Equals("50015210") || catid.Equals("50015215") || catid.Equals("50015193") || catid.Equals("50009361") || catid.Equals("50024878") || catid.Equals("50007010") || attrstr.IndexOf("重量(g)") > 0 || (catid.Length > 0 && (catid.Substring(0, catid.Length - 2).Equals("500140") || catid.Substring(0, catid.Length - 3).Equals("50024") || catid.Substring(0, catid.Length - 1).Equals("29050"))));
		}
		private string method_61(string string_12)
		{
			string result;
			try
			{
				int num = string_12.IndexOf(".");
				if (num < 0)
				{
					result = string_12 + ".000000";
				}
				else
				{
					int num2 = string_12.Length - num - 1;
					for (int i = 0; i < 6 - num2; i++)
					{
						string_12 += "0";
					}
					result = string_12;
				}
			}
			catch (Exception)
			{
				result = string_12;
			}
			return result;
		}
		private bool method_62(string string_12)
		{
			return string_12.Equals("20000");
		}
		private string method_63(string string_12)
		{
			StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\food1.txt", false);
			streamWriter.Write(string_12);
			streamWriter.Close();
			int num = 0;
			string result;
			try
			{
				string text = "contact:";
				int num2 = string_12.IndexOf("厂家联系方式：");
				if (num2 > 0)
				{
					string text2 = string_12.Substring(num2 + 7);
					text2 = text2.Substring(0, text2.IndexOf("<")).Trim();
					text += text2;
				}
				text += ";design_code:";
				num2 = string_12.IndexOf(">产品标准号：");
				if (num2 > 0)
				{
					string text3 = string_12.Substring(num2 + 7);
					text3 = text3.Substring(0, text3.IndexOf("<")).Trim();
					text += text3;
				}
				num = 1;
				text += ";factory:";
				num2 = string_12.IndexOf(">厂名：");
				if (num2 > 0)
				{
					string text4 = string_12.Substring(num2 + 4);
					text4 = text4.Substring(0, text4.IndexOf("<")).Trim();
					text += text4;
				}
				num = 2;
				text += ";factory_site:";
				num2 = string_12.IndexOf(">厂址：");
				if (num2 > 0)
				{
					string text5 = string_12.Substring(num2 + 4);
					text5 = text5.Substring(0, text5.IndexOf("<")).Trim();
					text += text5;
				}
				num = 3;
				text += ";food_additive:";
				num2 = string_12.IndexOf(">食品添加剂：");
				if (num2 > 0)
				{
					string text6 = string_12.Substring(num2 + 7);
					text6 = text6.Substring(0, text6.IndexOf("<")).Trim();
					text += text6;
				}
				num = 4;
				text += ";mix:";
				num2 = string_12.IndexOf(">配料表：");
				if (num2 > 0)
				{
					string text7 = string_12.Substring(num2 + 5);
					text7 = text7.Substring(0, text7.IndexOf("<")).Trim();
					text += text7;
				}
				num = 5;
				text += ";period:";
				num2 = string_12.IndexOf(">保质期：");
				if (num2 > 0)
				{
					string text8 = string_12.Substring(num2 + 5);
					text8 = text8.Substring(0, text8.IndexOf("<")).Trim().Replace(" 天", "");
					text += text8;
				}
				text += ";plan_storage:";
				num2 = string_12.IndexOf(">储藏方法：");
				if (num2 > 0)
				{
					string text9 = string_12.Substring(num2 + 6);
					text9 = text9.Substring(0, text9.IndexOf("<")).Trim();
					text += text9;
				}
				num = 6;
				text += ";prd_license_no:";
				num2 = string_12.IndexOf(">生产许可证编号：");
				if (num2 > 0)
				{
					string text10 = string_12.Substring(num2 + 9);
					text10 = text10.Substring(0, text10.IndexOf("<")).Trim();
					text += text10;
				}
				num = 7;
				text += ";product_date_end:";
				streamWriter = new StreamWriter(Application.StartupPath + "\\food2.txt", false);
				streamWriter.Write(string_12);
				streamWriter.Close();
				string text11 = "";
				num2 = string_12.IndexOf("生产日期:");
				if (num2 > 0)
				{
					string text12 = string_12.Substring(num2 + 6);
					text12 = text12.Substring(text12.IndexOf("至") + 2);
					num2 = text12.IndexOf("<");
					if (num2 > 0)
					{
						text12 = text12.Substring(0, text12.IndexOf("<")).Trim();
					}
					text12 = text12.Replace("日", "").Replace("年", "-").Replace("月", "-").Trim();
					text11 = text12;
					text += text12;
				}
				num = 8;
				text += ";product_date_start:";
				num2 = string_12.IndexOf("生产日期:");
				if (num2 > 0)
				{
					string text13 = string_12.Substring(num2 + 6);
					text13 = text13.Substring(0, text13.IndexOf("至")).Trim().Replace("日", "").Replace("年", "-").Replace("月", "-").Trim();
					text += text13;
				}
				num = 9;
				text += ";stock_date_end:";
				num2 = string_12.IndexOf("生产日期:");
				if (num2 > 0)
				{
					string text14 = string_12.Substring(num2 + 6);
					text14 = text14.Substring(text14.IndexOf("至") + 2);
					num2 = text14.IndexOf("<");
					if (num2 > 0)
					{
						text14 = text14.Substring(0, text14.IndexOf("<")).Trim();
					}
					text14 = text14.Replace("日", "").Replace("年", "-").Replace("月", "-").Trim();
					text14 = DateTime.Now.ToString("yyyy-MM-dd");
					text += text14;
				}
				num = 10;
				text += ";stock_date_start:";
				num2 = string_12.IndexOf("生产日期:");
				if (num2 > 0)
				{
					string text15 = string_12.Substring(num2 + 6);
					text15 = text15.Substring(0, text15.IndexOf("至")).Trim().Replace("日", "").Replace("年", "-").Replace("月", "-").Trim();
					text15 = text11;
					text += text15;
				}
				num = 11;
				text += ";supplier:";
				num2 = string_12.IndexOf(">厂名：");
				if (num2 > 0)
				{
					string text16 = string_12.Substring(num2 + 4);
					text16 = text16.Substring(0, text16.IndexOf("<")).Trim();
					text += text16;
				}
				result = text;
			}
			catch (Exception)
			{
				this.WriteLog("GFP:" + num.ToString(), 1);
				result = "";
			}
			return result;
		}
		private string[] method_64(string string_12, string string_13, int int_10, string string_14)
		{
			int num = 0;
			string text = this.method_39(string_12);
			this.string_3 = "";
			if (string_12.IndexOf(">食品添加剂：") >= 0 || string_12.IndexOf(">配料表：") >= 0)
			{
				this.string_3 = this.method_63(string_12);
			}
			string_12 = string_12.Replace("&amp;", "&");
			int num2 = 0;
			if (string_12.IndexOf("ISBN编号") >= 0)
			{
				num2 = 1;
				string_12 = string_12.Replace("...", "");
			}
			else
			{
				if (string_13.Equals("50008055") && string_12.IndexOf("重量(g)") < 0)
				{
					string_12 += "<li title=\"重量(g): 250\">重量(g): 250</li>";
				}
			}
			string_12 = string_12.Replace("挎", "跨");
			string text2 = string_12.Substring(0);
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			try
			{
				oleDbCommand.CommandText = "select cid from ppcat where cid='" + string_13 + "' and flag<10000";
				dataBase.Open();
				OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
				int num3 = 0;
				if (oleDbDataReader.Read())
				{
					num3 = 1;
				}
				oleDbDataReader.Close();
				dataBase.Close();
				if (num3 == 0)
				{
					oleDbCommand.CommandText = "delete from ppcat where cid='" + string_13 + "'";
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
					oleDbCommand.CommandText = "delete from ppoption where cid='" + string_13 + "'";
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
					oleDbCommand.CommandText = "delete from ppattr where cid='" + string_13 + "'";
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
					oleDbCommand.CommandText = string.Concat(new string[]
					{
						"insert into ppcat([name],parent_cid,cid,flag) values('",
						string_13,
						"',0,'",
						string_13,
						"',0)"
					});
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
					this.method_71();
				}
			}
			catch (Exception)
			{
				try
				{
					dataBase.Close();
				}
				catch (Exception)
				{
				}
			}
			string[] array = new string[]
			{
				"",
				"",
				""
			};
			int num4 = 0;
			string_12 = string_12.Replace("：", ":");
			string text3 = "";
			num4 = 111;
			int num5 = this.method_65(string_12);
			num4 = 110;
			string[][] array2 = new string[num5][];
			string[][] array3 = new string[num5][];
			int num6 = 0;
			try
			{
				if (this.prop_type == 1)
				{
					int i = string_12.IndexOf("<li");
					num4 = 1;
					while (i >= 0)
					{
						string_12 = string_12.Substring(i);
						num4 = 2;
						string_12 = string_12.Substring(string_12.IndexOf(">") + 1);
						num4 = 3;
						string text4 = string_12.Substring(0, string_12.IndexOf("</li>"));
						num4 = 4;
						int num7 = text4.IndexOf(":");
						num4 = 5;
						if (num7 < 0)
						{
							num7 = text4.IndexOf("&");
							if (num7 < 0)
							{
								num7 = text4.Length - 1;
							}
						}
						string text5 = text4.Substring(0, num7).Trim();
						num4 = 6;
						string text6 = text4.Substring(num7 + 1).Replace("\t", "").Trim();
						num4 = 7;
						if (text6.StartsWith("&nbsp;"))
						{
							text6 = text6.Substring(6);
						}
						num4 = 8;
						if (string_13.Equals("50012032") && text5.IndexOf("颜色") >= 0)
						{
							i = string_12.IndexOf("<li");
						}
						else
						{
							if (string_13.Equals("50018599") && text5.IndexOf("适用机型") >= 0)
							{
								i = string_12.IndexOf("<li");
							}
							else
							{
								if (int_10 == 1 && (text5.Equals("颜色") || text5.Equals("颜色分类") || (!this.ckNoSellProp.Checked && (text5.Equals("尺码") || text5.Equals("运动鞋尺码"))) || text5.Equals("颜色分类") || text5.Equals("颜色")))
								{
									num4 = 10;
									i = string_12.IndexOf("<li");
								}
								else
								{
									if (string_13.Equals("50011981") && text5.IndexOf("产品名称") >= 0)
									{
										num4 = 11;
										i = string_12.IndexOf("<li");
									}
									else
									{
										if (string_13.Equals("50005700") && (text5.Equals("风格") || text5.Equals("形状")))
										{
											num4 = 11;
											i = string_12.IndexOf("<li");
										}
										else
										{
											if (string_13.Equals("50011980") && text5.Equals("乳液/面霜单品"))
											{
												i = string_12.IndexOf("<li");
											}
											else
											{
												if (string_13.Equals("50011978") && text5.Equals("化妆水/爽肤水单品"))
												{
													i = string_12.IndexOf("<li");
												}
												else
												{
													if (string_13.Equals("50011993") && text5.EndsWith("单品"))
													{
														i = string_12.IndexOf("<li");
													}
													else
													{
														if (string_13.Equals("50000671") && text5.IndexOf("主要颜色") >= 0)
														{
															num4 = 11;
															i = string_12.IndexOf("<li");
														}
														else
														{
															if (text5.IndexOf("产品名称") >= 0)
															{
																num4 = 12;
																i = string_12.IndexOf("<li");
															}
															else
															{
																if (string_13.Equals("50000852") && text5.Equals("袖长") && string_12.IndexOf(">袖长:") > 0)
																{
																	i = string_12.IndexOf("<li");
																}
																else
																{
																	num4 = 13;
																	if (text5.IndexOf("同城特色服务") >= 0)
																	{
																		text6 = text6.Replace("...", "门").Replace("24小时", "").Trim();
																	}
																	else
																	{
																		text6 = text6.Replace("...", "").Trim();
																	}
																	num4 = 14;
																	array2[num6] = new string[3];
																	array2[num6][0] = text5.Replace("'", "''");
																	num4 = 20;
																	array2[num6][1] = this.method_39(text6.Replace("'", "''").Replace("&gt;", ">").Replace("&lt;", "<")).Replace("-待删", "").Replace(",", "");
																	num4 = 21;
																	if (array2[num6][1].IndexOf("智能手机") >= 0)
																	{
																		if (array2[num6][1] == "智能手机")
																		{
																			array2[num6][1] = "是";
																		}
																		else
																		{
																			array2[num6][1] = "否";
																		}
																	}
																	num4 = 150;
																	if (string_13.Equals("50018607"))
																	{
																		if (array2[num6][0].IndexOf("品牌") >= 0 && array2[num6][1].Equals("Capdase"))
																		{
																			array2[num6][1] = "Capdase/卡登仕";
																		}
																	}
																	else
																	{
																		if (string_13.Equals("50018599") || string_13.Equals("150704"))
																		{
																			if (array2[num6][0].IndexOf("品牌") >= 0)
																			{
																				array2[num6][0] = array2[num6][0].Replace("保护壳/套", "");
																				array2[num6][1] = array2[num6][1].Replace("other/其他", "其\u3000它");
																			}
																			else
																			{
																				if (array2[num6][0].Equals("型号"))
																				{
																					array2[num6][1] = array2[num6][1] + ".";
																				}
																				else
																				{
																					if (array2[num6][0].Equals("适用手机机型"))
																					{
																						array2[num6][1] = array2[num6][1].Replace("Sony Ericsson/索尼爱立信", "Sony/索尼");
																					}
																				}
																			}
																		}
																	}
																	num4 = 15;
																	if (array2[num6][1].Length > 0)
																	{
																		array2[num6][2] = "0";
																	}
																	else
																	{
																		array2[num6][2] = "1";
																	}
																	num4 = 16;
																	if (string_13.Equals("110210"))
																	{
																		if (array2[num6][1].Trim().Equals("其他型号"))
																		{
																			string[] array4;
																			(array4 = array)[0] = array4[0] + "2743865:40779;";
																			array2[num6][2] = "1";
																		}
																	}
																	else
																	{
																		if (string_13.Equals("50012000") && array2[num6][0].IndexOf("单品") >= 0)
																		{
																			string[] array4;
																			(array4 = array2[num6])[1] = array4[1] + "。";
																		}
																		else
																		{
																			if (string_13.Equals("50024879") && (array2[num6][0].IndexOf("种子类别") >= 0 || array2[num6][0].IndexOf("播种季节") >= 0 || array2[num6][0].IndexOf("开花季节") >= 0))
																			{
																				array2[num6][1] = array2[num6][1].Replace(" ", "&nbsp;");
																			}
																			else
																			{
																				if ((string_13.Equals("50012579") || string_13.Equals("50018610") || string_13.Equals("50018609") || string_13.Equals("50018607")) && array2[num6][0].IndexOf("型号") >= 0)
																				{
																					string[] array4;
																					(array4 = array2[num6])[1] = array4[1] + "\u3000\u3000";
																					array2[num6][1] = array2[num6][1].Replace(" ", "").Replace("/", "-");
																				}
																			}
																		}
																	}
																	num4 = 17;
																	if (array2[num6][0].IndexOf("充值类型") >= 0)
																	{
																		array2[num6][0] = "充值类型";
																	}
																	else
																	{
																		if ((text.IndexOf("阿芙") <= 0 || (array2[num6][0].IndexOf("化妆水/爽肤水单品") < 0 && array2[num6][0].IndexOf("乳液/面霜单品") < 0)) && array2[num6][0].IndexOf("化妆水/爽肤水单品") < 0 && array2[num6][0].IndexOf("面部精华单品") < 0 && array2[num6][0].IndexOf("洁面单品") < 0 && array2[num6][0].IndexOf("面部防晒单品") < 0 && array2[num6][0].IndexOf("乳液/面霜单品") < 0 && (array2[num6][0].IndexOf("化妆水/爽肤水单品") < 0 || string_13.Equals("50011978")) && (array2[num6][0].IndexOf("眼部护理单品") < 0 || string_13.Equals("50011986")))
																		{
																			if (array2[num6][0].IndexOf("面部精华单品") >= 0 && text.IndexOf("嘉媚乐") > 0)
																			{
																				array2[num6][1] = "玫瑰深层保湿精华";
																			}
																			else
																			{
																				if (array2[num6][1].IndexOf("嘉媚乐") >= 0)
																				{
																					array2[num6][1] = "CAMENAE/嘉媚乐";
																				}
																				else
																				{
																					if (array2[num6][0].IndexOf("充值数量/面值") >= 0)
																					{
																						num4 = 18;
																						array2[num6][0] = "充值数量";
																						if (array2[num6][1].IndexOf("/") > 0)
																						{
																							array2[num6][1] = array2[num6][1].Substring(0, array2[num6][1].IndexOf("/"));
																						}
																					}
																					else
																					{
																						if (array2[num6][0].IndexOf("系列") > 0)
																						{
																							num4 = 19;
																							if (array2[num6][1].IndexOf("系列") > 0)
																							{
																								array2[num6][1] = array2[num6][1].Replace("系列", "");
																							}
																						}
																					}
																				}
																			}
																		}
																	}
																	num6++;
																	num4 = 9;
																	i = string_12.IndexOf("<li");
																}
															}
														}
													}
												}
											}
										}
									}
								}
							}
						}
					}
					if (string_13.Equals("150704"))
					{
						for (int j = 0; j < num6; j++)
						{
							if (array2[j][0].Equals("品牌"))
							{
								string text7 = array2[j][0];
								string text8 = array2[j][1];
								string text9 = array2[j][2];
								array2[j][0] = array2[1][0];
								array2[j][1] = array2[1][1];
								array2[j][2] = array2[1][2];
								array2[1][0] = text7;
								array2[1][1] = text8;
								array2[1][2] = text9;
							}
							else
							{
								if (array2[j][0].Equals("型号"))
								{
									string text10 = array2[j][0];
									string text11 = array2[j][1];
									string text12 = array2[j][2];
									array2[j][0] = array2[0][0];
									array2[j][1] = array2[0][1];
									array2[j][2] = array2[0][2];
									array2[0][0] = text10;
									array2[0][1] = text11;
									array2[0][2] = text12;
								}
							}
						}
					}
				}
				else
				{
					if (this.prop_type == 2)
					{
						for (int k = string_12.IndexOf("<tr><th>"); k > 0; k = string_12.IndexOf("<tr><th>"))
						{
							string_12 = string_12.Substring(k + 8);
							string text13 = string_12.Substring(0, string_12.IndexOf("<")).Trim();
							string_12 = string_12.Substring(string_12.IndexOf("<td>") + 4);
							string text14 = string_12.Substring(0, string_12.IndexOf("<")).Trim();
							if (text14.StartsWith("&nbsp;"))
							{
								text14 = text14.Substring(6);
							}
							array2[num6] = new string[3];
							array2[num6][0] = text13.Replace("'", "''");
							array2[num6][1] = this.method_39(text14.Replace("'", "''").Replace("&gt;", ">").Replace("&lt;", "<")).Replace("-待删", "").Replace(",", "");
							if (array2[num6][1].IndexOf("智能手机") >= 0)
							{
								if (array2[num6][1] == "智能手机")
								{
									array2[num6][1] = "是";
								}
								else
								{
									array2[num6][1] = "否";
								}
							}
							if (array2[num6][1].Length > 0)
							{
								array2[num6][2] = "0";
							}
							else
							{
								array2[num6][2] = "1";
							}
							num6++;
						}
					}
				}
				array3 = (string[][])array2.Clone();
				num4 = 1000;
				string text15 = "";
				for (int l = 0; l < num6; l++)
				{
					if (array2[l][0].Equals("系列"))
					{
						text3 = array2[l][1];
					}
					if (array2[l][2].Equals("0"))
					{
						if (string_13.Equals("50012027") && array2[l][0].Equals("货号"))
						{
							array[2] = array[2] + "13021751";
							array[1] = array[1] + array2[l][1] + ",";
							array2[l][2] = "1";
						}
						else
						{
							if ((string_13.Equals("50023710") || string_13.Equals("50023620")) && array2[l][0].Equals("适用年龄"))
							{
								if (array2[l][1].IndexOf("3周岁以上") >= 0)
								{
									array[0] = array[0] + "20017:135182473;";
								}
								else
								{
									if (array2[l][1].IndexOf("14周岁以上") >= 0)
									{
										array[0] = array[0] + "20017:81121134;";
									}
									else
									{
										if (array2[l][1].IndexOf("3周岁以下") >= 0)
										{
											array[0] = array[0] + "20017:275706727;";
										}
										else
										{
											if (array2[l][1].IndexOf("6周岁以上") >= 0)
											{
												array[0] = array[0] + "20017:385578365;";
											}
											else
											{
												array[0] = array[0] + "20017:402398313;";
											}
										}
									}
								}
								array2[l][2] = "1";
							}
							else
							{
								if (num2 == 1)
								{
									dataBase.Open();
									oleDbCommand.CommandText = string.Concat(new string[]
									{
										"select top 1 pid from ppattr where cid='",
										string_13,
										"' and [name]='",
										array2[l][0],
										"'"
									});
									OleDbDataReader oleDbDataReader2 = dataBase.ExecuteCmd4Reader(oleDbCommand);
									if (oleDbDataReader2.Read())
									{
										string[] array4;
										(array4 = array)[0] = array4[0] + oleDbDataReader2.GetString(0) + ":2147483647;";
										(array4 = array)[2] = array4[2] + oleDbDataReader2.GetString(0) + ",";
										(array4 = array)[1] = array4[1] + array2[l][1] + ",";
										array2[l][2] = "1";
										oleDbDataReader2.Close();
										dataBase.Close();
									}
									else
									{
										oleDbDataReader2.Close();
										dataBase.Close();
									}
								}
							}
						}
					}
				}
				num4 = 2000;
				string text16 = "-1";
				string text17 = "20000";
				for (int m = 0; m < num6; m++)
				{
					if (array2[m][2].Equals("0"))
					{
						if (text16.StartsWith("-"))
						{
							oleDbCommand.CommandText = string.Concat(new string[]
							{
								"select top 1 pid,vid from ppoption where cid='",
								string_13,
								"' and pname = '",
								array2[m][0],
								"' and vname like '%|",
								array2[m][1],
								"|%'"
							});
						}
						else
						{
							oleDbCommand.CommandText = string.Concat(new string[]
							{
								"select top 1 pid,vid from ppoption a where cid='",
								string_13,
								"' and pname = '",
								array2[m][0],
								"' and vname like '%|",
								array2[m][1],
								"|%' and pid in(select pid from ppattr where cid='",
								string_13,
								"' and parent_pid='",
								text17,
								"' and parent_vid='",
								text16,
								"')"
							});
							text16 = "0";
						}
						dataBase.Open();
						OleDbDataReader oleDbDataReader3 = dataBase.ExecuteCmd4Reader(oleDbCommand);
						if (oleDbDataReader3.Read())
						{
							if (oleDbDataReader3.GetString(0).Equals("20000") && text16.Equals("-1"))
							{
								text16 = oleDbDataReader3.GetString(1);
								text17 = oleDbDataReader3.GetString(0);
							}
							array[0] = string.Concat(new string[]
							{
								array[0],
								oleDbDataReader3.GetString(0),
								":",
								oleDbDataReader3.GetString(1),
								";"
							});
							array2[m][2] = "1";
						}
						oleDbDataReader3.Close();
						dataBase.Close();
					}
				}
				num4 = 3000;
				for (int n = 0; n < num6; n++)
				{
					if (array2[n][2].Equals("0"))
					{
						num4 = 3001;
						oleDbCommand.CommandText = string.Concat(new string[]
						{
							"select top 1 pid,vid from ppoption where cid='",
							string_13,
							"' and pname like  '%",
							array2[n][0],
							"%' and vname like '%|",
							array2[n][1],
							"|%'"
						});
						dataBase.Open();
						num4 = 3002;
						try
						{
							OleDbDataReader oleDbDataReader4 = dataBase.ExecuteCmd4Reader(oleDbCommand);
							num4 = 3003;
							if (oleDbDataReader4.Read())
							{
								num4 = 3004;
								array[0] = string.Concat(new string[]
								{
									array[0],
									oleDbDataReader4.GetString(0),
									":",
									oleDbDataReader4.GetString(1),
									";"
								});
								if (array2[n][1].IndexOf("其它品牌") < 0)
								{
									array2[n][2] = "1";
								}
							}
							oleDbDataReader4.Close();
							dataBase.Close();
						}
						catch (Exception)
						{
							dataBase.Close();
						}
					}
				}
				num4 = 3005;
				for (int num8 = 0; num8 < num6; num8++)
				{
					if (array2[num8][2].Equals("0"))
					{
						oleDbCommand.CommandText = string.Concat(new string[]
						{
							"select top 1 pid,vid from ppoption where cid='",
							string_13,
							"' and pname like  '%",
							array2[num8][0],
							"%' and vname like '%|",
							array2[num8][1],
							"%|%'"
						});
						dataBase.Open();
						try
						{
							OleDbDataReader oleDbDataReader5 = dataBase.ExecuteCmd4Reader(oleDbCommand);
							if (oleDbDataReader5.Read())
							{
								array[0] = string.Concat(new string[]
								{
									array[0],
									oleDbDataReader5.GetString(0),
									":",
									oleDbDataReader5.GetString(1),
									";"
								});
								if (array2[num8][1].IndexOf("其它品牌") < 0)
								{
									array2[num8][2] = "1";
								}
							}
							oleDbDataReader5.Close();
							dataBase.Close();
						}
						catch (Exception)
						{
							dataBase.Close();
						}
					}
				}
				num4 = 4000;
				num4 = 6000;
				num4 = 5000;
				num4 = 7000;
				for (int num9 = 0; num9 < num6; num9++)
				{
					if (array2[num9][2].Equals("0"))
					{
						oleDbCommand.CommandText = string.Concat(new string[]
						{
							"select distinct top 1 parent_pid,parent_vid from ppattr where cid='",
							string_13,
							"' and name ='",
							array2[num9][1],
							"'"
						});
						dataBase.Open();
						OleDbDataReader oleDbDataReader6 = dataBase.ExecuteCmd4Reader(oleDbCommand);
						if (oleDbDataReader6.Read())
						{
							array[0] = string.Concat(new string[]
							{
								array[0],
								oleDbDataReader6.GetString(0),
								":",
								oleDbDataReader6.GetString(1),
								";"
							});
							array2[num9][2] = "1";
						}
						oleDbDataReader6.Close();
						dataBase.Close();
					}
				}
				num4 = 8000;
				num4 = 9000;
				for (int num10 = 0; num10 < num6; num10++)
				{
					if (array2[num10][2].Equals("0") && !array2[num10][0].Equals("型号") && array2[num10][0].IndexOf("品牌") < 0)
					{
						array2[num10][1] = array2[num10][1].Replace(" ", "&nbsp;");
					}
					if (array2[num10][2].Equals("0") && array2[num10][1].IndexOf("&nbsp;") > 0)
					{
						string[] array5 = Regex.Split(array2[num10][1], "&nbsp;", RegexOptions.IgnoreCase);
						string[] array6 = array5;
						for (int num11 = 0; num11 < array6.Length; num11++)
						{
							string text18 = array6[num11];
							oleDbCommand.CommandText = string.Concat(new string[]
							{
								"select top 1 pid,vid from ppoption where cid='",
								string_13,
								"' and pname like '%",
								array2[num10][0],
								"%' and vname like '%|",
								text18.Trim(),
								"|%'"
							});
							dataBase.Open();
							OleDbDataReader oleDbDataReader7 = dataBase.ExecuteCmd4Reader(oleDbCommand);
							if (oleDbDataReader7.Read())
							{
								array[0] = string.Concat(new string[]
								{
									array[0],
									oleDbDataReader7.GetString(0),
									":",
									oleDbDataReader7.GetString(1),
									";"
								});
								array2[num10][2] = "1";
							}
							oleDbDataReader7.Close();
							dataBase.Close();
						}
					}
				}
				num4 = 10000;
				for (int num12 = 0; num12 < num6; num12++)
				{
					if (array2[num12][2].Equals("0") && array2[num12][1].IndexOf("&nbsp;") > 0)
					{
						string[] array7 = Regex.Split(array2[num12][1], "&nbsp;", RegexOptions.IgnoreCase);
						string[] array6 = array7;
						for (int num11 = 0; num11 < array6.Length; num11++)
						{
							string text19 = array6[num11];
							oleDbCommand.CommandText = string.Concat(new string[]
							{
								"select top 1 pid,vid from ppoption where cid='",
								string_13,
								"' and vname like '%|",
								text19.Trim(),
								"|%'"
							});
							dataBase.Open();
							OleDbDataReader oleDbDataReader8 = dataBase.ExecuteCmd4Reader(oleDbCommand);
							if (oleDbDataReader8.Read())
							{
								array[0] = string.Concat(new string[]
								{
									array[0],
									oleDbDataReader8.GetString(0),
									":",
									oleDbDataReader8.GetString(1),
									";"
								});
								array2[num12][2] = "1";
							}
							array2[num12][2] = "1";
							oleDbDataReader8.Close();
							dataBase.Close();
						}
					}
				}
				num4 = 11000;
				num4 = 12000;
				int num13 = 0;
				for (int num14 = 0; num14 < num6; num14++)
				{
					if (array2[num14][2].Equals("0"))
					{
						if (string_13.Equals("50012043") && array2[num14][0].Equals("品牌"))
						{
							array2[num14][2] = "1";
							num = 1;
						}
						oleDbCommand.CommandText = string.Concat(new string[]
						{
							"select top 1 parent_pid from ppattr where cid='",
							string_13,
							"' and name='",
							array2[num14][0],
							"' order by clng(parent_pid)"
						});
						dataBase.Open();
						OleDbDataReader oleDbDataReader9 = dataBase.ExecuteCmd4Reader(oleDbCommand);
						if (oleDbDataReader9.Read())
						{
							text15 = oleDbDataReader9.GetString(0);
							oleDbDataReader9.Close();
							dataBase.Close();
							if (!text15.Equals("0"))
							{
								string text20 = "";
								string text21 = "";
								for (int num15 = 0; num15 < num6; num15++)
								{
									oleDbCommand.CommandText = string.Concat(new string[]
									{
										"select top 1 vid from ppoption where cid='",
										string_13,
										"' and pid='",
										text15,
										"' and pname='",
										array2[num15][0],
										"' and vname like '%|",
										array2[num15][1],
										"|%'"
									});
									dataBase.Open();
									oleDbDataReader9 = dataBase.ExecuteCmd4Reader(oleDbCommand);
									if (oleDbDataReader9.Read())
									{
										text20 = oleDbDataReader9.GetString(0);
										text21 = array2[num15][1];
										oleDbDataReader9.Close();
										dataBase.Close();
										array2[num15][2] = "1";
										IL_1AF8:
										if (text20.Length < 1)
										{
											text20 = "2147483647";
											for (int num16 = 0; num16 < num6; num16++)
											{
												oleDbCommand.CommandText = string.Concat(new string[]
												{
													"select top 1 vid from ppoption where cid='",
													string_13,
													"' and pid='",
													text15,
													"' and pname='",
													array2[num16][0],
													"'"
												});
												dataBase.Open();
												oleDbDataReader9 = dataBase.ExecuteCmd4Reader(oleDbCommand);
												if (oleDbDataReader9.Read())
												{
													text21 = array2[num16][1];
													oleDbDataReader9.Close();
													dataBase.Close();
													array2[num16][2] = "1";
													break;
												}
												oleDbDataReader9.Close();
												dataBase.Close();
											}
										}
										oleDbCommand.CommandText = string.Concat(new string[]
										{
											"select top 1 pid,parent_pid,parent_vid from ppattr where cid='",
											string_13,
											"' and parent_pid='",
											text15,
											"' and parent_vid='",
											text20,
											"' and name='",
											array2[num14][0],
											"'"
										});
										dataBase.Open();
										this.WriteLog(oleDbCommand.CommandText, 3);
										oleDbDataReader9 = dataBase.ExecuteCmd4Reader(oleDbCommand);
										string str;
										if (oleDbDataReader9.Read())
										{
											str = oleDbDataReader9.GetString(0);
										}
										else
										{
											str = "2147483647";
										}
										oleDbDataReader9.Close();
										dataBase.Close();
										array[0] = array[0] + str + ":2147483647;";
										if (array[2].Length < 1 && num13 == 0)
										{
											array[2] = "," + text15;
											num13 = 1;
										}
										else
										{
											if (array[2].IndexOf("," + text15) < 0 && array[2].IndexOf(",20000") < 0 && num13 == 0)
											{
												this.WriteLog("1111:" + array[2], 3);
												array[2] = array[2] + "," + text15 + ",";
												this.WriteLog("2222:" + array[2], 3);
												num13 = 1;
											}
										}
										this.WriteLog("5555:" + array[1], 3);
										if (array[1].IndexOf("," + text21 + ";") < 0 && array[1].IndexOf(";" + text21 + ";") < 0 && array[1].IndexOf(";" + text21 + ",") < 0)
										{
											string[] array4;
											(array4 = array)[1] = array4[1] + "," + text21 + ";";
											this.WriteLog("6666:" + array[1], 3);
										}
										this.WriteLog("3333:" + array[1], 3);
										array[1] = string.Concat(new string[]
										{
											array[1].TrimEnd(new char[]
											{
												',',
												';'
											}),
											";",
											this.method_39(array2[num14][0]),
											";",
											this.method_39(array2[num14][1]),
											","
										});
										this.WriteLog("4444:" + array[1], 3);
										array2[num14][2] = "1";
										goto IL_1E71;
									}
									oleDbDataReader9.Close();
									dataBase.Close();
								}
								//goto IL_1AF8;
							}
						}
						else
						{
							oleDbDataReader9.Close();
							dataBase.Close();
						}
					}
					IL_1E71:;
				}
				for (int num17 = 0; num17 < num6; num17++)
				{
					if (array2[num17][2].Equals("0"))
					{
						oleDbCommand.CommandText = "select top 1 pid,parent_pid,parent_vid from ppattr where pid<>'0' and name='" + array2[num17][0] + "'";
						dataBase.Open();
						OleDbDataReader oleDbDataReader10 = dataBase.ExecuteCmd4Reader(oleDbCommand);
						if (oleDbDataReader10.Read())
						{
							string @string = oleDbDataReader10.GetString(0);
							string string2 = oleDbDataReader10.GetString(1);
							string string3 = oleDbDataReader10.GetString(2);
							oleDbDataReader10.Close();
							dataBase.Close();
							array[0] = array[0] + @string + ":2147483647;";
							if (string2.Equals("0"))
							{
								if (array2[num17][0].IndexOf("品牌") >= 0)
								{
									array[1] = "," + this.method_39(array2[num17][1]) + array[1].TrimEnd(new char[]
									{
										';',
										','
									});
									if (!@string.Equals("0"))
									{
										array[2] = "," + @string + array[2].TrimEnd(new char[]
										{
											';',
											','
										});
									}
								}
								else
								{
									array[1] = array[1].TrimEnd(new char[]
									{
										';',
										','
									}) + "," + this.method_39(array2[num17][1]) + ",";
									if (!@string.Equals("0"))
									{
										array[2] = array[2].TrimEnd(new char[]
										{
											';',
											','
										}) + "," + @string + ",";
									}
								}
							}
							else
							{
								DataBase dataBase2 = new DataBase();
								OleDbCommand cmd = new OleDbCommand(string.Concat(new string[]
								{
									"select [vname] from ppoption where cid='",
									string_13,
									"' and pid='",
									string3,
									"' and vid='",
									string3,
									"'"
								}));
								string text22 = "";
								dataBase2.Open();
								OleDbDataReader oleDbDataReader11 = dataBase2.ExecuteCmd4Reader(cmd);
								if (oleDbDataReader11.Read())
								{
									text22 = oleDbDataReader11.GetString(0) + ";";
								}
								oleDbDataReader11.Close();
								dataBase2.Close();
								array[1] = string.Concat(new string[]
								{
									array[1].TrimEnd(new char[]
									{
										';',
										','
									}),
									";",
									text22,
									this.method_39(array2[num17][0]),
									";",
									this.method_39(array2[num17][1]),
									","
								});
								if (!text15.Equals("0"))
								{
									if (array[2].Length < 1)
									{
										array[2] = "," + array[2] + text15;
									}
									else
									{
										array[2] = array[2] + text15 + ",";
									}
								}
							}
							array2[num17][2] = "1";
						}
						else
						{
							oleDbDataReader10.Close();
							dataBase.Close();
						}
					}
				}
				num4 = 13000;
				num4 = 14000;
				for (int num18 = 0; num18 < num6; num18++)
				{
					if (array2[num18][2].Equals("0"))
					{
						if (array2[num18][0].Equals("货号"))
						{
							if (array[2].Length > 1)
							{
								array[0] = array[0] + "1632501:2147483647;";
								array[2] = array[2] + "1632501";
								array[1] = string.Concat(new string[]
								{
									array[1],
									array2[num18][0],
									",",
									array2[num18][1],
									","
								});
								array2[num18][2] = "1";
							}
							else
							{
								array[0] = array[0] + "1632501:2147483647;";
								array[2] = array[2] + "1632501";
								array[1] = array[1] + array2[num18][1] + ",";
								array2[num18][2] = "1";
							}
						}
						else
						{
							if (array2[num18][0].Equals("规格"))
							{
								array[1] = string.Concat(new string[]
								{
									array[1].TrimEnd(new char[]
									{
										','
									}),
									";",
									array2[num18][0],
									";",
									array2[num18][1]
								});
							}
							else
							{
								array2[num18][2] = "1";
							}
						}
					}
				}
			}
			catch (Exception ex)
			{
				this.WriteLog("GenProp:" + num4.ToString() + ex.Message, 1);
			}
			if (string_13.Equals("50008612") && text3.Length > 0 && array[1].IndexOf("系列") < 0)
			{
				int num19 = array[1].IndexOf(",");
				string text23 = array[1];
				if (num19 == 0)
				{
					string text24 = text23.Substring(0, 1);
					text23 = text23.Substring(1);
					num19 = text23.IndexOf(",");
					if (num19 > 0)
					{
						text24 += text23.Substring(0, num19);
						text24 = text24 + ";系列;" + text3 + text23.Substring(num19);
					}
					else
					{
						text24 = text24 + ";系列;" + text3;
					}
					array[1] = text24;
				}
			}
			if (string_13.Equals("50012090"))
			{
				if (text2.IndexOf("坐垫类型") < 0)
				{
					array[0] = "7001498:68930085;" + array[0];
				}
				if (text2.IndexOf("套件数量") < 0)
				{
					array[0] = array[0] + "21871:10122;";
				}
			}
			if (!array[1].StartsWith(","))
			{
				array[1] = "," + array[1];
			}
			if (!array[2].StartsWith(","))
			{
				array[2] = "," + array[2];
			}
			array[1] = array[1].TrimEnd(new char[]
			{
				','
			});
			array[2] = array[2].TrimEnd(new char[]
			{
				','
			});
			array[1] = array[1].TrimEnd(new char[]
			{
				';'
			}).Replace(",,", ",");
			array[2] = array[2].TrimEnd(new char[]
			{
				';'
			});
			if (string_13.Equals("150704") && array[2].Equals(",20000,20000"))
			{
				array[2] = ",20000";
				string str2 = array[1].Substring(array[1].LastIndexOf(","));
				array[1] = str2 + array[1].Substring(0, array[1].LastIndexOf(",")).TrimStart(new char[]
				{
					','
				});
			}
			if (string_13.Equals("50000671") && array[2].Equals(",1632501"))
			{
				array[2] = ",13021751";
			}
			if (string_13.Equals("50022728"))
			{
				array[2] = array[2].Replace(",10574189", ",6103476").Replace(",1632501", ",13021751");
			}
			if (array[2].IndexOf(",20000") >= 0 && array[0].IndexOf("20000:") < 0)
			{
				array[0] = "20000:2147483647;2147483647:2147483647;" + array[0];
			}
			if (array[2].StartsWith(",20000,") && array[2].EndsWith(",20000"))
			{
				array[2] = array[2].Substring(0, array[2].Length - 6);
			}
			if (array[2].EndsWith(",20000") && array[2].IndexOf(",20000") > 0)
			{
				array[2] = ",20000" + array[2].Substring(0, array[2].Length - 6);
			}
			if (string_13.Equals("50007874"))
			{
				if (array[0].IndexOf("1626031:") < 0)
				{
					array[0] = "1626031:53515;" + array[0];
				}
			}
			else
			{
				if (string_13.Equals("50007439"))
				{
					if (array[0].IndexOf("25685:") < 0)
					{
						array[0] = "25685:53515;" + array[0];
					}
				}
				else
				{
					if (string_13.Equals("50007937"))
					{
						if (array[0].IndexOf("1626031:") < 0)
						{
							array[0] = "1626031:53515;" + array[0];
						}
					}
					else
					{
						if (string_13.Equals("50007212"))
						{
							if (array[0].IndexOf("21676:") < 0)
							{
								array[0] = "21676:43474;" + array[0];
							}
						}
						else
						{
							if (string_13.Equals("50007452"))
							{
								if (array[0].IndexOf("25934:") < 0)
								{
									array[0] = "25934:53515;" + array[0];
								}
							}
							else
							{
								if (string_13.Equals("50007779") && array[1].IndexOf("面值") > 0 && array[2].Length < 3)
								{
									for (int num20 = 0; num20 < num6; num20++)
									{
										if (array2[num20][0].Equals("游戏名"))
										{
											array[2] = ",1627228";
											oleDbCommand.CommandText = string.Concat(new string[]
											{
												"select pid from ppattr where cid='",
												string_13,
												"' and name ='面值/类型' and parent_pid='1627228' and parent_vid in(select vid from ppoption where cid='",
												string_13,
												"' and pname like '%",
												array2[num20][0],
												"%' and vname like '%",
												array2[num20][1],
												"%')"
											});
											dataBase.Open();
											OleDbDataReader oleDbDataReader12 = dataBase.ExecuteCmd4Reader(oleDbCommand);
											if (oleDbDataReader12.Read())
											{
												string string4 = oleDbDataReader12.GetString(0);
												array[1] = "," + array2[num20][1] + ";" + array[1].TrimStart(new char[]
												{
													','
												});
												string[] array4;
												string[] expr_2908 = array4 = array;
												int arg_2945_1 = 0;
												string text25 = array4[0];
												expr_2908[arg_2945_1] = string.Concat(new string[]
												{
													text25,
													string4,
													":2147483647;",
													string4,
													":2147483647;"
												});
											}
											else
											{
												if (array2[num20][1].Equals("昆仑"))
												{
													array[1] = ",昆仑一卡通;" + array[1].TrimStart(new char[]
													{
														','
													});
													string[] array4;
													(array4 = array)[0] = array4[0] + "2004386:2147483647;2004386:2147483647;";
												}
												else
												{
													array[1] = "," + array2[num20][1] + ";" + array[1].TrimStart(new char[]
													{
														','
													});
													string[] array4;
													(array4 = array)[0] = array4[0] + "2012616:2147483647;2012616:2147483647;";
												}
											}
											oleDbDataReader12.Close();
											dataBase.Close();
										}
									}
								}
							}
						}
					}
				}
			}
			if (string_13.Equals("150704") && text.IndexOf(">适用手机机型:") > 0 && text.IndexOf(">三星型号:") > 0)
			{
				if (array[2].Equals(",20000"))
				{
					array[2] = "20000,34179";
					array[1] = array[1].Replace(";三星型号;", ",SAMSUNG/三星;三星型号;");
				}
			}
			else
			{
				if (string_13.Equals("150704"))
				{
					if (array[2].Equals(",20000") && array[1].IndexOf(";型号;") >= 0)
					{
						string[] array4;
						(array4 = array)[2] = array4[2] + ",34179";
					}
					string text26 = "";
					for (int num21 = 0; num21 < num6; num21++)
					{
						if (array3[num21][0].Equals("适用手机机型"))
						{
							text26 = array3[num21][1];
						}
					}
					if (text26.Length > 0)
					{
						array[1] = array[1].Replace(".;", ".," + text26 + ";");
					}
				}
				else
				{
					if (string_13.Equals("50002256"))
					{
						for (int num22 = 0; num22 < num6; num22++)
						{
							if (array3[num22][0].Equals("重量"))
							{
								string[] array4;
								(array4 = array)[2] = array4[2] + ",3344920";
								(array4 = array)[1] = array4[1] + "," + array3[num22][1];
								break;
							}
						}
					}
					else
					{
						if (string_13.Equals("50005700"))
						{
							array[0] = array[0].Replace(";22341:", ";20930:");
							array[0] = array[0].Replace(";22340:", ";122216608:");
							array[0] = array[0].Replace(":46499;", ":20533;");
							array[0] = array[0].Replace(":46500;", ":29923;");
							array[0] = array[0].Replace(":3377468;", ":27845;");
							array[0] = array[0].Replace(":133588;", ":133588;");
							array[0] = array[0].Replace(":46501;", ":47698;");
							array[0] = array[0].Replace(":47696;", ":47696;");
							array[0] = array[0].Replace(":46498;", ":20532;");
							string[] array4;
							(array4 = array)[0] = array4[0] + ";20608:3534559;20819:31865;";
						}
						else
						{
							if (string_13.Equals("1512"))
							{
								if (array[0].IndexOf("20879:") < 0)
								{
									string[] array4;
									(array4 = array)[0] = array4[0] + ";20879:21456;";
								}
								if (array[0].IndexOf("20930:") < 0)
								{
									string[] array4;
									(array4 = array)[0] = array4[0] + ";20930:32998;";
								}
							}
						}
					}
				}
			}
			if (string_13.Equals("50003494"))
			{
				if (text.IndexOf("颜色分类") >= 0)
				{
					array[0] = array[0] + ";1627207:14863995;";
				}
			}
			else
			{
				if (string_13.Equals("50011980"))
				{
					array[0] = array[0] + ";1632930:14863995;";
				}
				else
				{
					if ((string_13.Equals("50011981") || string_13.Equals("50011979")) && string_12.IndexOf("规格类型") < 0)
					{
						array[0] = array[0] + ";122276080:96241;";
					}
					else
					{
						if (string_13.Equals("50011978"))
						{
							array[0] = array[0] + ";15590821:14863995;";
						}
					}
				}
			}
			if (text.IndexOf(">配料表：") > 0 && text.IndexOf(">产地: 港澳台地区") > 0)
			{
				if (string_14.IndexOf("香港") >= 0)
				{
					string[] array4;
					(array4 = array)[0] = array4[0] + ";16801681:3296647;";
				}
				else
				{
					if (string_14.IndexOf("澳门") >= 0)
					{
						string[] array4;
						(array4 = array)[0] = array4[0] + ";16801681:3296648;";
					}
					else
					{
						string[] array4;
						(array4 = array)[0] = array4[0] + ";16801681:52865;";
					}
				}
			}
			if (string_13.Equals("50012043") && num == 1)
			{
				array[0] = "20000:29534;" + array[0];
			}
			else
			{
				if (string_13.Equals("50011993"))
				{
					array[0] = array[0] + "20987:14863995;";
				}
			}
			array[0] = array[0].Replace(";;", ";");
			array[2] = array[2].Replace(",20000,20000", ",20000");
			return array;
		}
		private int method_65(string string_12)
		{
			if (this.prop_type == 1)
			{
				int num = 0;
				int num2 = 0;
				byte[] bytes = Encoding.ASCII.GetBytes(string_12);
				for (int i = 0; i < bytes.Length; i++)
				{
					char c = (char)bytes[i];
					char c2 = c;
					if (c2 != '<')
					{
						if (c2 != 'i')
						{
							if (c2 != 'l')
							{
								num = 0;
							}
							else
							{
								if (num == 1)
								{
									num = 2;
								}
								else
								{
									num = 0;
								}
							}
						}
						else
						{
							if (num == 2)
							{
								num2++;
								num = 0;
							}
							else
							{
								num = 0;
							}
						}
					}
					else
					{
						num = 1;
					}
				}
				return num2;
			}
			int j = string_12.IndexOf("<tr><th>");
			int num3 = 0;
			while (j > 0)
			{
				num3++;
				string_12 = string_12.Substring(j + 1);
				j = string_12.IndexOf("<tr><th>");
			}
			return num3;
		}
		private void menuItem_10_Click(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabLog;
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://search1.taobao.com/browse/ad_search_shop.htm");
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.GetEncoding("gb2312"));
			string text = streamReader.ReadToEnd();
			streamReader.Close();
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			oleDbCommand.CommandText = "delete from ppcat";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.WriteLog("清空原分类成功", 1);
			text = text.Substring(text.IndexOf("不限</option>"));
			text = text.Substring(0, text.IndexOf("</select>"));
			for (int i = text.IndexOf("value="); i > 0; i = text.IndexOf("value="))
			{
				text = text.Substring(i + 7);
				string text2 = text.Substring(0, text.IndexOf("\""));
				string text3 = "true";
				text = text.Substring(text.IndexOf(">") + 1);
				string text4 = text.Substring(0, text.IndexOf("<"));
				string text5 = "0";
				text4 = text4.Replace("\\/", "/");
				this.WriteLog(string.Concat(new string[]
				{
					"找到一级分类[",
					text2,
					"|",
					text4,
					"]"
				}), 1);
				oleDbCommand.CommandText = string.Concat(new string[]
				{
					"insert into ppcat(name,is_parent,parent_cid,cid,flag) values('",
					text4,
					"',",
					text3,
					",'",
					text5,
					"','",
					text2,
					"',0)"
				});
				try
				{
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
				}
				catch (Exception ex)
				{
					this.WriteLog(ex.Message, 1);
					return;
				}
			}
			this.WriteLog("一级分类更新成功", 1);
		}
		private string method_66(string string_12)
		{
			StringBuilder stringBuilder = new StringBuilder();
			int i = 0;
			while (i < string_12.Length)
			{
				char c = string_12[i];
				char c2 = c;
				if (c2 <= 'ヂ')
				{
					if (c2 != 'じ')
					{
						switch (c2)
						{
						case 'ガ':
							stringBuilder.Append('1');
							break;
						case 'キ':
						case 'ク':
						case 'ケ':
						case 'コ':
						case 'サ':
						case 'シ':
						case 'ス':
						case 'セ':
						case 'ソ':
						case 'タ':
						case 'チ':
							goto IL_25A;
						case 'ギ':
							stringBuilder.Append('2');
							break;
						case 'グ':
							stringBuilder.Append('3');
							break;
						case 'ゲ':
							stringBuilder.Append('4');
							break;
						case 'ゴ':
							stringBuilder.Append('0');
							break;
						case 'ザ':
							stringBuilder.Append('5');
							break;
						case 'ジ':
							stringBuilder.Append('6');
							break;
						case 'ズ':
							stringBuilder.Append('7');
							break;
						case 'ゼ':
							stringBuilder.Append('q');
							break;
						case 'ゾ':
							stringBuilder.Append('p');
							break;
						case 'ダ':
							stringBuilder.Append('o');
							break;
						case 'ヂ':
							stringBuilder.Append('n');
							break;
						default:
							goto IL_25A;
						}
					}
					else
					{
						stringBuilder.Append('g');
					}
				}
				else
				{
					switch (c2)
					{
					case 'ヅ':
						stringBuilder.Append('8');
						break;
					case 'テ':
					case 'ト':
					case 'ナ':
					case 'ニ':
					case 'ヌ':
					case 'ネ':
					case 'ノ':
					case 'ハ':
					case 'ヒ':
					case 'フ':
					case 'ヘ':
					case 'ホ':
						goto IL_25A;
					case 'デ':
						stringBuilder.Append('9');
						break;
					case 'ド':
						stringBuilder.Append('a');
						break;
					case 'バ':
						stringBuilder.Append('m');
						break;
					case 'パ':
						stringBuilder.Append('f');
						break;
					case 'ビ':
						stringBuilder.Append('e');
						break;
					case 'ピ':
						stringBuilder.Append('l');
						break;
					case 'ブ':
						stringBuilder.Append('k');
						break;
					case 'プ':
						stringBuilder.Append('d');
						break;
					case 'ベ':
						stringBuilder.Append('c');
						break;
					case 'ペ':
						stringBuilder.Append('j');
						break;
					case 'ボ':
						stringBuilder.Append('i');
						break;
					case 'ポ':
						stringBuilder.Append('b');
						break;
					default:
						if (c2 != 'ヴ')
						{
							goto IL_25A;
						}
						stringBuilder.Append('h');
						break;
					}
				}
				IL_27E:
				i++;
				continue;
				IL_25A:
				stringBuilder.Append(string_12[i]);
				goto IL_27E;
			}
			return stringBuilder.ToString();
		}
		private void method_67(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabLog;
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://open.taobao.com/api_tool/props/");
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.UTF8);
			string text = streamReader.ReadToEnd();
			streamReader.Close();
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			oleDbCommand.CommandText = "delete from ppcat";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.WriteLog("清空原分类成功", 1);
			text = text.Substring(text.IndexOf("cid0_api"));
			text = text.Substring(0, text.IndexOf(";"));
			for (int i = text.IndexOf("cid\":"); i > 0; i = text.IndexOf("cid\":"))
			{
				text = text.Substring(i + 5);
				string text2 = text.Substring(0, text.IndexOf(","));
				text = text.Substring(text.IndexOf("is_parent") + 11);
				string text3 = text.Substring(0, text.IndexOf(","));
				text = text.Substring(text.IndexOf("name") + 7);
				string text4 = text.Substring(0, text.IndexOf("\""));
				text = text.Substring(text.IndexOf("parent_cid") + 12);
				string text5 = text.Substring(0, text.IndexOf(","));
				text = text.Substring(text.IndexOf("status") + 9);
				text.Substring(0, text.IndexOf("\""));
				text4 = text4.Replace("\\/", "/");
				this.WriteLog(string.Concat(new string[]
				{
					"找到一级分类[",
					text2,
					"|",
					text4,
					"]"
				}), 1);
				oleDbCommand.CommandText = string.Concat(new string[]
				{
					"insert into ppcat(name,is_parent,parent_cid,cid,flag) values('",
					text4,
					"',",
					text3,
					",'",
					text5,
					"','",
					text2,
					"',0)"
				});
				try
				{
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
				}
				catch (Exception ex)
				{
					this.WriteLog(ex.Message, 1);
					return;
				}
			}
			this.WriteLog("一级分类更新成功", 1);
		}
		private void menuItem_11_Click(object sender, EventArgs e)
		{
			this.method_68(0);
		}
		private void method_68(int int_10)
		{
			this.WriteLog("开始更新子分类", 1);
			this.tabCtl.SelectedTab = this.tabLog;
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			if (int_10 == 0)
			{
				oleDbCommand.CommandText = "delete from ppcat where parent_cid<>'0'";
				dataBase.ExecuteCmdNonQuery(oleDbCommand);
				oleDbCommand.CommandText = "update ppcat set flag=0";
				dataBase.ExecuteCmdNonQuery(oleDbCommand);
				this.WriteLog("清空原子分类", 1);
				oleDbCommand.CommandText = "select cid,name,flag from ppcat as ppcat2 where is_parent=true and flag<1000 and not exists(select * from ppcat where parent_cid=ppcat2.cid)";
			}
			else
			{
				oleDbCommand.CommandText = "select cid,name,flag from ppcat as ppcat2 where is_parent=true and flag<1000 and not exists(select * from ppcat where parent_cid=ppcat2.cid)";
			}
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
			while (oleDbDataReader.Read())
			{
				try
				{
					string @string = oleDbDataReader.GetString(0);
					string string2 = oleDbDataReader.GetString(1);
					oleDbDataReader.GetInt32(2);
					string requestUriString = "http://open.taobao.com/api_tool/props/ajaxProps.php?cid=" + @string + "&action=childCid&restBool=false";
					HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(requestUriString);
					httpWebRequest.Referer = "http://api.taobao.com/apitools/apiPropTools.htm";
					HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
					Stream responseStream = httpWebResponse.GetResponseStream();
					StreamReader streamReader = new StreamReader(responseStream, Encoding.UTF8);
					string text = streamReader.ReadToEnd();
					streamReader.Close();
					for (int i = text.IndexOf("\"cid\":"); i > 0; i = text.IndexOf("\"cid\":"))
					{
						text = text.Substring(i + 6);
						string text2 = text.Substring(0, text.IndexOf(","));
						string text3 = text.Substring(text.IndexOf("is_parent") + 11);
						text3 = text3.Substring(0, text3.IndexOf(","));
						string text4 = text.Substring(text.IndexOf("name") + 7);
						text4 = text4.Substring(0, text4.IndexOf("\""));
						string text5 = text.Substring(text.IndexOf("parent_cid") + 12);
						text5 = text5.Substring(0, text5.IndexOf(","));
						string text6 = text.Substring(text.IndexOf("status") + 9);
						text6 = text6.Substring(0, text6.IndexOf("\""));
						text4 = text4.Replace("\\/", "/");
						this.WriteLog(string.Concat(new string[]
						{
							"找到分类[",
							@string,
							"|",
							string2,
							"]下的子分类[",
							text2,
							"|",
							text4,
							"]"
						}), 1);
						DataBase dataBase2 = new DataBase();
						OleDbCommand oleDbCommand2 = new OleDbCommand();
						oleDbCommand2.CommandText = string.Concat(new string[]
						{
							"insert into ppcat(name,is_parent,parent_cid,cid,flag) values('",
							text4,
							"',",
							text3,
							",'",
							text5,
							"','",
							text2,
							"',1)"
						});
						try
						{
							dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
						}
						catch (Exception ex)
						{
							this.WriteLog(ex.Message, 1);
							return;
						}
					}
				}
				catch (Exception ex2)
				{
					this.WriteLog(oleDbDataReader.GetString(0) + "|" + ex2.Message, 1);
					DataBase dataBase3 = new DataBase();
					dataBase3.ExecuteCmdNonQuery(new OleDbCommand
					{
						CommandText = "update ppcat set flag=1000+flag where cid='" + oleDbDataReader.GetString(0) + "'"
					});
					Thread.Sleep(500);
					continue;
				}
				Thread.Sleep(500);
				Application.DoEvents();
			}
			oleDbDataReader.Close();
			dataBase.Close();
			this.WriteLog("更新子分类成功", 1);
		}
		private void menuItem_12_Click(object sender, EventArgs e)
		{
			this.method_68(1);
		}
		private void menuItem_13_Click(object sender, EventArgs e)
		{
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			oleDbCommand.CommandText = "update ppcat set flag=flag mod 100 where flag>=100 and flag<1000";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "delete from ppattr";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "delete from ppoption";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.WriteLog("清除原有属性成功", 1);
		}
		private void menuItem_14_Click(object sender, EventArgs e)
		{
			this.method_71();
			this.method_69();
		}
		private void method_69()
		{
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			DataBase dataBase2 = new DataBase();
			OleDbCommand oleDbCommand2 = new OleDbCommand("delete from ppoption where pname like '%单品%'");
			dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
			oleDbCommand2.CommandText = "select cid,pid,vid,vname from ppoption where vname like '%斜跨%'";
			dataBase2.Open();
			OleDbDataReader oleDbDataReader = dataBase2.ExecuteCmd4Reader(oleDbCommand2);
			while (oleDbDataReader.Read())
			{
				string @string = oleDbDataReader.GetString(0);
				string string2 = oleDbDataReader.GetString(1);
				string string3 = oleDbDataReader.GetString(2);
				string string4 = oleDbDataReader.GetString(3);
				oleDbCommand.CommandText = string.Concat(new string[]
				{
					"update ppoption set vname='",
					string4.Replace("斜跨", "斜挎"),
					"' where cid='",
					@string,
					"' and pid='",
					string2,
					"' and vid='",
					string3,
					"'"
				});
				dataBase.ExecuteCmdNonQuery(oleDbCommand);
			}
			oleDbDataReader.Close();
			dataBase2.Close();
		}
		private void method_70()
		{
			DataBase dataBase = new DataBase();
			dataBase.ExecuteCmdNonQuery(new OleDbCommand
			{
				CommandText = "insert into ppoption values('50012010','1626905','27370','箱包风格','欧美')"
			});
		}
		private void method_71()
		{
			if (!this.regString[0].Equals(this.GetMachineCode()) && !this.txtMachineCode.Text.Trim().Equals(this.GetMachineCode()))
			{
				this.ShowNoRegMessage();
				return;
			}
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			oleDbCommand.CommandText = "select cid,name from ppcat where flag<100 and is_parent=false";
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
			int num = 0;
			if (this.string_8.Length < 4)
			{
				this.ShowNoRegMessage();
				return;
			}
			string[] array = this.string_8[3].Split(new char[]
			{
				','
			});
			IL_CBF:
			while (oleDbDataReader.Read())
			{
				string text = "";
				while (true)
				{
					IL_CA1:
					string text2 = "";
					num = 10;
					try
					{
						string @string = oleDbDataReader.GetString(0);
						if (@string.Trim().Length < 1)
						{
							goto IL_CBF;
						}
						string string2 = oleDbDataReader.GetString(1);
						DataBase dataBase2 = new DataBase();
						OleDbCommand oleDbCommand2 = new OleDbCommand();
						this.WriteLog(string.Concat(new string[]
						{
							"开始收集原来未收集分类[",
							@string,
							"|",
							string2,
							"]下的属性,有些分类属性数据较多，请耐心等一小会，每个类目只要读取属性数据一次之后就不用再读了，所以复制速度会越来越快"
						}), 1);
						int num2 = 0;
						while (!@string.Equals("50005700") && !@string.Equals("50023620") && !@string.Equals("50023710") && !@string.Equals("111404") && !@string.Equals("50011980") && !@string.Equals("50011981"))
						{
							if (num2 == 1)
							{
								break;
							}
							if (text.Length < 1)
							{
								text = "http://api.taobao.com/apitools/ajax_props.do?act=props&cid=" + @string + "&restBool=false";
							}
							try
							{
								HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(text);
								httpWebRequest.Timeout = 30000;
								HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
								Stream responseStream = httpWebResponse.GetResponseStream();
								StreamReader streamReader = new StreamReader(responseStream, Encoding.UTF8);
								text2 = streamReader.ReadToEnd();
								streamReader.Close();
								httpWebResponse.Close();
								goto IL_299;
							}
							catch (Exception)
							{
								num2 = 1;
							}
							continue;
							IL_299:
							num = 11;
							StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\prop.txt", false);
							streamWriter.WriteLine(text);
							streamWriter.WriteLine(text2);
							streamWriter.Close();
							if (text2.IndexOf("error_response") > 0 || (text2.IndexOf("var props=;") >= 0 && text2.IndexOf("var propvalues=;") >= 0))
							{
								Application.DoEvents();
								Thread.Sleep(1000);
								Application.DoEvents();
								if (text.IndexOf("open.taobao.com") >= 0)
								{
									text = "http://api.taobao.com/apitools/ajax_props.do?act=props&cid=" + @string + "&restBool=false";
								}
								else
								{
									this.WriteLog(string.Concat(new string[]
									{
										"分类[",
										@string,
										"|",
										string2,
										"]读取属性列表出错，过１称自动重试"
									}), 1);
									text = string.Concat(new string[]
									{
										"http://",
										this.domain,
										"/soft/prop/",
										@string,
										".txt"
									});
								}
								goto IL_CA1;
							}
							if (text2.IndexOf("itemprops_get_response\":{}") > 0 && text2.IndexOf("itempropvalues_get_response\":{}") > 0)
							{
								oleDbCommand2.CommandText = "update ppcat set flag=100+flag where flag<100 and cid='" + @string + "'";
								dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								goto IL_CBF;
							}
							num = 12;
							int num3 = text2.IndexOf(code.decode(array[1]));
							if (num3 < 0)
							{
								num3 = text2.Length - 1;
							}
							string text3 = text2.Substring(0, num3);
							num++;
							string text4;
							for (int i = text3.IndexOf("[{\""); i > 0; i = text3.IndexOf("{\""))
							{
								num = 13;
								Application.DoEvents();
								text3 = text3.Substring(i + 2);
								text4 = text3.Substring(0, text3.IndexOf("}"));
								string text5 = text4.Substring(text4.IndexOf("is_item_prop") + 14);
								text5 = text5.Substring(0, text5.IndexOf(","));
								string text6 = text4.Substring(text4.IndexOf("is_input_prop") + 15);
								text6 = text6.Substring(0, text6.IndexOf(","));
								string text7 = text4.Substring(text4.IndexOf("status") + 9);
								text7 = text7.Substring(0, text7.IndexOf("\""));
								string text8 = text4.Substring(text4.IndexOf("sort_order") + 12);
								text8 = text8.Substring(0, text8.IndexOf(","));
								string text9 = text4.Substring(text4.IndexOf("is_enum_prop") + 14);
								text9 = text9.Substring(0, text9.IndexOf(","));
								string text10 = text4.Substring(text4.IndexOf("parent_vid") + 12);
								text10 = text10.Substring(0, text10.IndexOf(","));
								string text11 = text4.Substring(text4.IndexOf("\"pid") + 6);
								text11 = text11.Substring(0, text11.IndexOf(","));
								num = 14;
								string text12 = text4.Substring(text4.IndexOf("must") + 6);
								text12 = text12.Substring(0, text12.IndexOf(","));
								string text13 = text4.Substring(text4.IndexOf("name") + 7);
								text13 = text13.Substring(0, text13.IndexOf("\"")).Replace("'", "''");
								string text14 = text4.Substring(text4.IndexOf("parent_pid") + 12);
								text14 = text14.Substring(0, text14.IndexOf(","));
								string text15 = text4.Substring(text4.IndexOf("multi") + 7);
								text15 = text15.Substring(0, text15.IndexOf(","));
								string text16 = text4.Substring(text4.IndexOf("is_sale_prop") + 14);
								text16 = text16.Substring(0, text16.IndexOf(","));
								string text17 = text4.Substring(text4.IndexOf("is_color_prop") + 15);
								text17 = text17.Substring(0, text17.IndexOf(","));
								string text18 = text4.Substring(text4.IndexOf("is_key_prop") + 13);
								text18 = text18.Substring(0, text18.IndexOf(","));
								text13 = text13.Replace("\\/", "/").Replace("\\\\", "\\");
								oleDbCommand2.CommandText = string.Concat(new string[]
								{
									"insert into ppattr(cid,pid,is_color_prop,is_enum_prop,is_input_prop,is_item_prop,is_key_prop,is_sale_prop,multi,must,[name],parent_pid,parent_vid) values('",
									@string,
									"','",
									text11,
									"',",
									text17,
									",",
									text9,
									",",
									text6,
									",",
									text5,
									",",
									text18,
									",",
									text16,
									",",
									text15,
									",",
									text12,
									",'",
									text13,
									"','",
									text14,
									"','",
									text10,
									"')"
								});
								try
								{
									dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								}
								catch (Exception)
								{
								}
							}
							num = 15;
							num3 = text2.IndexOf("propvalues");
							if (num3 < 0)
							{
								goto IL_CBF;
							}
							text4 = text2.Substring(num3);
							string[] array2 = Regex.Split(text4, "{\"cid\":");
							for (int j = 1; j < array2.Length; j++)
							{
								string[] array3 = Regex.Split(array2[j], ",\"");
								string text19 = array3[1].Substring(array3[1].IndexOf(":") + 1).Trim(new char[]
								{
									'"'
								}).Replace("'", "''");
								string text20 = array3[2].Substring(array3[2].IndexOf(":") + 1).Trim(new char[]
								{
									'"'
								}).Replace("'", "''");
								string text21 = string.Concat(new string[]
								{
									"|",
									text19,
									"|",
									text20,
									"|"
								});
								num = 16;
								string text22 = array3[3].Substring(array3[3].IndexOf(":") + 1);
								string text23 = array3[4].Substring(array3[4].IndexOf(":") + 1).Trim(new char[]
								{
									'"'
								}).Replace("'", "''");
								array3[5].Substring(array3[5].IndexOf(":") + 1);
								num = 17;
								array3[6].Substring(array3[6].IndexOf(":") + 1).Trim(new char[]
								{
									'"'
								});
								string text24 = array3[7].Substring(array3[7].IndexOf(":") + 1);
								text24 = text24.Substring(0, text24.IndexOf("}"));
								num = 18;
								text23 = this.method_66(text23);
								text21 = this.method_66(text21);
								oleDbCommand2.CommandText = string.Concat(new string[]
								{
									"insert into ppoption(cid,pid,vid,pname,vname) values('",
									@string,
									"','",
									text22,
									"','",
									text24,
									"','",
									text23.Replace("\\/", "/"),
									"','",
									text21.Replace("挎", "跨").Replace("\\/", "/").Replace("\\\\", "\\"),
									"')"
								});
								try
								{
									dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								}
								catch (Exception)
								{
								}
							}
							num = 19;
							oleDbCommand2.CommandText = "update ppcat set flag=100+flag where flag<100 and cid='" + @string + "'";
							dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
							oleDbCommand2.CommandText = "select distinct b.cid,b.pid,b.name from ppoption a inner join ppattr b on a.cid=b.cid and a.pid=b.pid where b.cid='" + @string + "' and a.pname<>b.name";
							dataBase2.Open();
							OleDbDataReader oleDbDataReader2 = dataBase2.ExecuteCmd4Reader(oleDbCommand2);
							DataBase dataBase3 = new DataBase();
							OleDbCommand oleDbCommand3 = new OleDbCommand();
							while (oleDbDataReader2.Read())
							{
								string string3 = oleDbDataReader2.GetString(0);
								string string4 = oleDbDataReader2.GetString(1);
								string string5 = oleDbDataReader2.GetString(2);
								oleDbCommand3.CommandText = string.Concat(new string[]
								{
									"update ppoption set pname=pname&'",
									string5,
									"' where cid='",
									string3,
									"' and pid='",
									string4,
									"'"
								});
								dataBase3.ExecuteCmdNonQuery(oleDbCommand3);
							}
							oleDbDataReader2.Close();
							dataBase2.Close();
							goto IL_CB0;
						}
						if (text.Length < 1)
						{
							text = string.Concat(new string[]
							{
								"http://",
								this.domain,
								"/soft/prop/",
								@string,
								".txt"
							});
						}
						HttpWebRequest httpWebRequest2 = (HttpWebRequest)WebRequest.Create(text);
						HttpWebResponse httpWebResponse2 = (HttpWebResponse)httpWebRequest2.GetResponse();
						Stream responseStream2 = httpWebResponse2.GetResponseStream();
						StreamReader streamReader2 = new StreamReader(responseStream2, Encoding.UTF8);
						text2 = streamReader2.ReadToEnd();
						streamReader2.Close();
						httpWebResponse2.Close();
						//goto IL_299;
					}
					catch (Exception ex)
					{
						this.WriteLog(string.Concat(new string[]
						{
							"处理分类[",
							oleDbDataReader.GetString(0),
							"|",
							oleDbDataReader.GetString(1),
							"]出错:",
							num.ToString(),
							ex.Message
						}), 1);
						StreamWriter streamWriter2 = new StreamWriter("err.log", false);
						streamWriter2.WriteLine(text2);
						streamWriter2.Close();
						DataBase dataBase4 = new DataBase();
						dataBase4.ExecuteCmdNonQuery(new OleDbCommand
						{
							CommandText = "update ppcat set flag=10000+flag where cid='" + oleDbDataReader.GetString(0) + "' and flag<100"
						});
						break;
					}
				}
				IL_CB0:
				Application.DoEvents();
				Thread.Sleep(500);
			}
			oleDbDataReader.Close();
			dataBase.Close();
		}
		private void method_72()
		{
			if (!this.regString[0].Equals(this.GetMachineCode()) && !this.txtMachineCode.Text.Trim().Equals(this.GetMachineCode()))
			{
				this.ShowNoRegMessage();
				return;
			}
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			oleDbCommand.CommandText = "select cid,name from ppcat where flag<100 and is_parent=false";
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
			int num = 0;
			if (this.string_8.Length < 4)
			{
				this.ShowNoRegMessage();
				return;
			}
			string[] array = this.string_8[3].Split(new char[]
			{
				','
			});
			IL_B93:
			while (oleDbDataReader.Read())
			{
				while (true)
				{
					string text = "";
					try
					{
						string @string = oleDbDataReader.GetString(0);
						string string2 = oleDbDataReader.GetString(1);
						DataBase dataBase2 = new DataBase();
						OleDbCommand oleDbCommand2 = new OleDbCommand();
						this.WriteLog(string.Concat(new string[]
						{
							"开始收集原来未收集分类[",
							@string,
							"|",
							string2,
							"]下的属性,有些分类属性数据较多，请耐心等一小会，每个类目只要读取属性数据一次之后就不用再读了，所以复制速度会越来越快"
						}), 1);
						if (!@string.Equals("50005700") && !@string.Equals("111404") && !@string.Equals("50011980"))
						{
							HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(code.decode(array[0]) + @string + "&action=props&restBool=false");
							HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
							Stream responseStream = httpWebResponse.GetResponseStream();
							StreamReader streamReader = new StreamReader(responseStream, Encoding.UTF8);
							text = streamReader.ReadToEnd();
							streamReader.Close();
							httpWebResponse.Close();
						}
						else
						{
							HttpWebRequest httpWebRequest2 = (HttpWebRequest)WebRequest.Create(string.Concat(new string[]
							{
								"http://",
								this.domain,
								"/soft/prop/",
								@string,
								".txt"
							}));
							HttpWebResponse httpWebResponse2 = (HttpWebResponse)httpWebRequest2.GetResponse();
							Stream responseStream2 = httpWebResponse2.GetResponseStream();
							StreamReader streamReader2 = new StreamReader(responseStream2, Encoding.UTF8);
							text = streamReader2.ReadToEnd();
							streamReader2.Close();
							httpWebResponse2.Close();
						}
						if (text.IndexOf("error_response") > 0)
						{
							Application.DoEvents();
							this.WriteLog(string.Concat(new string[]
							{
								"分类[",
								@string,
								"|",
								string2,
								"]读取属性列表出错，过１称自动重试"
							}), 1);
							Thread.Sleep(1000);
							Application.DoEvents();
						}
						else
						{
							if (text.IndexOf("itemprops_get_response\":{}") > 0 && text.IndexOf("itempropvalues_get_response\":{}") > 0)
							{
								oleDbCommand2.CommandText = "update ppcat set flag=100+flag where flag<100 and cid='" + @string + "'";
								dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								goto IL_B93;
							}
							int num2 = text.IndexOf(code.decode(array[1]));
							if (num2 < 0)
							{
								num2 = text.Length - 1;
							}
							string text2 = text.Substring(0, num2);
							num++;
							string text3 = "";
							for (int i = text2.IndexOf("[{\""); i > 0; i = text2.IndexOf("{\""))
							{
								Application.DoEvents();
								text2 = text2.Substring(i + 2);
								text3 = text2.Substring(0, text2.IndexOf("}"));
								string text4 = text3.Substring(text3.IndexOf("is_item_prop") + 14);
								text4 = text4.Substring(0, text4.IndexOf(","));
								string text5 = text3.Substring(text3.IndexOf("is_input_prop") + 15);
								text5 = text5.Substring(0, text5.IndexOf(","));
								string text6 = text3.Substring(text3.IndexOf("status") + 9);
								text6 = text6.Substring(0, text6.IndexOf("\""));
								string text7 = text3.Substring(text3.IndexOf("sort_order") + 12);
								text7 = text7.Substring(0, text7.IndexOf(","));
								string text8 = text3.Substring(text3.IndexOf("is_enum_prop") + 14);
								text8 = text8.Substring(0, text8.IndexOf(","));
								string text9 = text3.Substring(text3.IndexOf("parent_vid") + 12);
								text9 = text9.Substring(0, text9.IndexOf(","));
								string text10 = text3.Substring(text3.IndexOf("\"pid") + 6);
								text10 = text10.Substring(0, text10.IndexOf(","));
								string text11 = text3.Substring(text3.IndexOf("must") + 6);
								text11 = text11.Substring(0, text11.IndexOf(","));
								string text12 = text3.Substring(text3.IndexOf("name") + 7);
								text12 = text12.Substring(0, text12.IndexOf("\"")).Replace("'", "''");
								string text13 = text3.Substring(text3.IndexOf("parent_pid") + 12);
								text13 = text13.Substring(0, text13.IndexOf(","));
								string text14 = text3.Substring(text3.IndexOf("multi") + 7);
								text14 = text14.Substring(0, text14.IndexOf(","));
								string text15 = text3.Substring(text3.IndexOf("is_sale_prop") + 14);
								text15 = text15.Substring(0, text15.IndexOf(","));
								string text16 = text3.Substring(text3.IndexOf("is_color_prop") + 15);
								text16 = text16.Substring(0, text16.IndexOf(","));
								string text17 = text3.Substring(text3.IndexOf("is_key_prop") + 13);
								text17 = text17.Substring(0, text17.IndexOf(","));
								text12 = text12.Replace("\\/", "/").Replace("\\\\", "\\");
								oleDbCommand2.CommandText = string.Concat(new string[]
								{
									"insert into ppattr(cid,pid,is_color_prop,is_enum_prop,is_input_prop,is_item_prop,is_key_prop,is_sale_prop,multi,must,[name],parent_pid,parent_vid) values('",
									@string,
									"','",
									text10,
									"',",
									text16,
									",",
									text8,
									",",
									text5,
									",",
									text4,
									",",
									text17,
									",",
									text15,
									",",
									text14,
									",",
									text11,
									",'",
									text12,
									"','",
									text13,
									"','",
									text9,
									"')"
								});
								try
								{
									dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								}
								catch (Exception)
								{
								}
							}
							num++;
							num2 = text.IndexOf("propvalues");
							if (num2 < 0)
							{
								goto IL_B93;
							}
							text3 = text.Substring(num2);
							int j = text3.IndexOf("name");
							num = 10000;
							while (j > 0)
							{
								Application.DoEvents();
								num++;
								text3 = text3.Substring(j + 7);
								num++;
								string text18 = text3.Substring(0, text3.IndexOf("\"")).Replace("'", "''");
								text3 = text3.Substring(text3.IndexOf("name_alias") + 13);
								text18 = string.Concat(new string[]
								{
									"|",
									text18,
									"|",
									text3.Substring(0, text3.IndexOf("\"")).Replace("'", "''"),
									"|"
								});
								num++;
								text3 = text3.Substring(text3.IndexOf("pid") + 5);
								num++;
								string text19 = text3.Substring(0, text3.IndexOf(","));
								num++;
								text3 = text3.Substring(text3.IndexOf("prop_name") + 12);
								num++;
								string text20 = text3.Substring(0, text3.IndexOf("\"")).Replace("'", "''");
								num++;
								text3 = text3.Substring(text3.IndexOf("sort_order") + 12);
								num++;
								text3.Substring(0, text3.IndexOf(","));
								num++;
								text3 = text3.Substring(text3.IndexOf("status") + 9);
								num++;
								text3.Substring(0, text3.IndexOf("\""));
								num++;
								text3 = text3.Substring(text3.IndexOf("vid") + 5);
								num++;
								string text21 = text3.Substring(0, text3.IndexOf("}"));
								num++;
								text20 = this.method_66(text20);
								text18 = this.method_66(text18);
								oleDbCommand2.CommandText = string.Concat(new string[]
								{
									"insert into ppoption(cid,pid,vid,pname,vname) values('",
									@string,
									"','",
									text19,
									"','",
									text21,
									"','",
									text20.Replace("\\/", "/"),
									"','",
									text18.Replace("挎", "跨").Replace("\\/", "/").Replace("\\\\", "\\"),
									"')"
								});
								try
								{
									dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								}
								catch (Exception)
								{
								}
								j = text3.IndexOf("name");
							}
							oleDbCommand2.CommandText = "update ppcat set flag=100+flag where flag<100 and cid='" + @string + "'";
							dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
							oleDbCommand2.CommandText = "select distinct b.cid,b.pid,b.name from ppoption a inner join ppattr b on a.cid=b.cid and a.pid=b.pid where b.cid='" + @string + "' and a.pname<>b.name";
							dataBase2.Open();
							OleDbDataReader oleDbDataReader2 = dataBase2.ExecuteCmd4Reader(oleDbCommand2);
							DataBase dataBase3 = new DataBase();
							OleDbCommand oleDbCommand3 = new OleDbCommand();
							while (oleDbDataReader2.Read())
							{
								string string3 = oleDbDataReader2.GetString(0);
								string string4 = oleDbDataReader2.GetString(1);
								string string5 = oleDbDataReader2.GetString(2);
								oleDbCommand3.CommandText = string.Concat(new string[]
								{
									"update ppoption set pname=pname&'",
									string5,
									"' where cid='",
									string3,
									"' and pid='",
									string4,
									"'"
								});
								dataBase3.ExecuteCmdNonQuery(oleDbCommand3);
							}
							oleDbDataReader2.Close();
							dataBase2.Close();
							break;
						}
					}
					catch (Exception ex)
					{
						this.WriteLog(string.Concat(new string[]
						{
							"处理分类[",
							oleDbDataReader.GetString(0),
							"|",
							oleDbDataReader.GetString(1),
							"]出错:",
							num.ToString(),
							ex.Message
						}), 1);
						StreamWriter streamWriter = new StreamWriter("err.log", false);
						streamWriter.WriteLine(text);
						streamWriter.Close();
						DataBase dataBase4 = new DataBase();
						dataBase4.ExecuteCmdNonQuery(new OleDbCommand
						{
							CommandText = "update ppcat set flag=10000+flag where cid='" + oleDbDataReader.GetString(0) + "' and flag<100"
						});
						break;
					}
				}
				Application.DoEvents();
				Thread.Sleep(500);
			}
			oleDbDataReader.Close();
			dataBase.Close();
		}
		private void method_73()
		{
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			oleDbCommand.CommandText = "select cid,name from ppcat where flag<100 and is_parent=false";
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(oleDbCommand);
			int num = 0;
			IL_AC2:
			while (oleDbDataReader.Read())
			{
				while (true)
				{
					string text = "";
					try
					{
						string @string = oleDbDataReader.GetString(0);
						string string2 = oleDbDataReader.GetString(1);
						DataBase dataBase2 = new DataBase();
						OleDbCommand oleDbCommand2 = new OleDbCommand();
						this.WriteLog(string.Concat(new string[]
						{
							"开始收集原来未收集分类[",
							@string,
							"|",
							string2,
							"]下的属性"
						}), 1);
						HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://open.taobao.com/api_tool/props/ajaxProps.php?cid=" + @string + "&action=props&restBool=false");
						HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
						Stream responseStream = httpWebResponse.GetResponseStream();
						StreamReader streamReader = new StreamReader(responseStream, Encoding.UTF8);
						text = streamReader.ReadToEnd();
						streamReader.Close();
						httpWebResponse.Close();
						if (text.IndexOf("error_response") > 0)
						{
							Application.DoEvents();
							this.WriteLog(string.Concat(new string[]
							{
								"分类[",
								@string,
								"|",
								string2,
								"]读取属性列表出错，过１称自动重试"
							}), 1);
							Thread.Sleep(1000);
							Application.DoEvents();
						}
						else
						{
							if (text.IndexOf("itemprops_get_response\":{}") > 0 && text.IndexOf("itempropvalues_get_response\":{}") > 0)
							{
								oleDbCommand2.CommandText = "update ppcat set flag=100+flag where flag<100 and cid='" + @string + "'";
								dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								goto IL_AC2;
							}
							int num2 = text.IndexOf("propvalues");
							if (num2 < 0)
							{
								num2 = text.Length - 1;
							}
							string text2 = text.Substring(0, num2);
							num++;
							string text3 = "";
							for (int i = text2.IndexOf("[{\""); i > 0; i = text2.IndexOf("{\""))
							{
								Application.DoEvents();
								text2 = text2.Substring(i + 2);
								text3 = text2.Substring(0, text2.IndexOf("}"));
								string text4 = text3.Substring(text3.IndexOf("is_item_prop") + 14);
								text4 = text4.Substring(0, text4.IndexOf(","));
								string text5 = text3.Substring(text3.IndexOf("is_input_prop") + 15);
								text5 = text5.Substring(0, text5.IndexOf(","));
								string text6 = text3.Substring(text3.IndexOf("status") + 9);
								text6 = text6.Substring(0, text6.IndexOf("\""));
								string text7 = text3.Substring(text3.IndexOf("sort_order") + 12);
								text7 = text7.Substring(0, text7.IndexOf(","));
								string text8 = text3.Substring(text3.IndexOf("is_enum_prop") + 14);
								text8 = text8.Substring(0, text8.IndexOf(","));
								string text9 = text3.Substring(text3.IndexOf("parent_vid") + 12);
								text9 = text9.Substring(0, text9.IndexOf(","));
								string text10 = text3.Substring(text3.IndexOf("\"pid") + 6);
								text10 = text10.Substring(0, text10.IndexOf(","));
								string text11 = text3.Substring(text3.IndexOf("must") + 6);
								text11 = text11.Substring(0, text11.IndexOf(","));
								string text12 = text3.Substring(text3.IndexOf("name") + 7);
								text12 = text12.Substring(0, text12.IndexOf("\"")).Replace("'", "''");
								string text13 = text3.Substring(text3.IndexOf("parent_pid") + 12);
								text13 = text13.Substring(0, text13.IndexOf(","));
								string text14 = text3.Substring(text3.IndexOf("multi") + 7);
								text14 = text14.Substring(0, text14.IndexOf(","));
								string text15 = text3.Substring(text3.IndexOf("is_sale_prop") + 14);
								text15 = text15.Substring(0, text15.IndexOf(","));
								string text16 = text3.Substring(text3.IndexOf("is_color_prop") + 15);
								text16 = text16.Substring(0, text16.IndexOf(","));
								string text17 = text3.Substring(text3.IndexOf("is_key_prop") + 13);
								text17 = text17.Substring(0, text17.IndexOf(","));
								oleDbCommand2.CommandText = string.Concat(new string[]
								{
									"insert into ppattr(cid,pid,is_color_prop,is_enum_prop,is_input_prop,is_item_prop,is_key_prop,is_sale_prop,multi,must,[name],parent_pid,parent_vid) values('",
									@string,
									"','",
									text10,
									"',",
									text16,
									",",
									text8,
									",",
									text5,
									",",
									text4,
									",",
									text17,
									",",
									text15,
									",",
									text14,
									",",
									text11,
									",'",
									text12,
									"','",
									text13,
									"','",
									text9,
									"')"
								});
								try
								{
									dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								}
								catch (Exception)
								{
								}
								this.WriteLog(string.Concat(new string[]
								{
									"分类[",
									@string,
									"|",
									string2,
									"]找到属性:",
									text12
								}), 1);
								Application.DoEvents();
							}
							num++;
							num2 = text.IndexOf("propvalues");
							if (num2 < 0)
							{
								goto IL_AC2;
							}
							text3 = text.Substring(num2);
							int j = text3.IndexOf("name");
							num = 10000;
							while (j > 0)
							{
								Application.DoEvents();
								num++;
								text3 = text3.Substring(j + 7);
								num++;
								string text18 = text3.Substring(0, text3.IndexOf("\"")).Replace("'", "''");
								text3 = text3.Substring(text3.IndexOf("name_alias") + 13);
								text18 = string.Concat(new string[]
								{
									"|",
									text18,
									"|",
									text3.Substring(0, text3.IndexOf("\"")).Replace("'", "''"),
									"|"
								});
								num++;
								text3 = text3.Substring(text3.IndexOf("pid") + 5);
								num++;
								string text19 = text3.Substring(0, text3.IndexOf(","));
								num++;
								text3 = text3.Substring(text3.IndexOf("prop_name") + 12);
								num++;
								string text20 = text3.Substring(0, text3.IndexOf("\"")).Replace("'", "''");
								num++;
								text3 = text3.Substring(text3.IndexOf("sort_order") + 12);
								num++;
								text3.Substring(0, text3.IndexOf(","));
								num++;
								text3 = text3.Substring(text3.IndexOf("status") + 9);
								num++;
								text3.Substring(0, text3.IndexOf("\""));
								num++;
								text3 = text3.Substring(text3.IndexOf("vid") + 5);
								num++;
								string text21 = text3.Substring(0, text3.IndexOf("}"));
								num++;
								oleDbCommand2.CommandText = string.Concat(new string[]
								{
									"insert into ppoption(cid,pid,vid,pname,vname) values('",
									@string,
									"','",
									text19,
									"','",
									text21,
									"','",
									text20,
									"','",
									text18.Replace("挎", "跨").Replace("\\/", "/"),
									"')"
								});
								try
								{
									dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
								}
								catch (Exception)
								{
								}
								this.WriteLog(string.Concat(new string[]
								{
									"新分类[",
									@string,
									"|",
									string2,
									"]属性[",
									text20,
									"]找到属性值:",
									text18
								}), 1);
								j = text3.IndexOf("name");
							}
							oleDbCommand2.CommandText = "update ppcat set flag=100+flag where flag<100 and cid='" + @string + "'";
							dataBase2.ExecuteCmdNonQuery(oleDbCommand2);
							oleDbCommand2.CommandText = "select distinct b.cid,b.pid,b.name from ppoption a inner join ppattr b on a.cid=b.cid and a.pid=b.pid where b.cid='" + @string + "' and a.pname<>b.name";
							dataBase2.Open();
							OleDbDataReader oleDbDataReader2 = dataBase2.ExecuteCmd4Reader(oleDbCommand2);
							DataBase dataBase3 = new DataBase();
							OleDbCommand oleDbCommand3 = new OleDbCommand();
							while (oleDbDataReader2.Read())
							{
								string string3 = oleDbDataReader2.GetString(0);
								string string4 = oleDbDataReader2.GetString(1);
								string string5 = oleDbDataReader2.GetString(2);
								oleDbCommand3.CommandText = string.Concat(new string[]
								{
									"update ppoption set pname=pname&'",
									string5,
									"' where cid='",
									string3,
									"' and pid='",
									string4,
									"'"
								});
								dataBase3.ExecuteCmdNonQuery(oleDbCommand3);
							}
							oleDbDataReader2.Close();
							dataBase2.Close();
							break;
						}
					}
					catch (Exception ex)
					{
						this.WriteLog(string.Concat(new string[]
						{
							"处理分类[",
							oleDbDataReader.GetString(0),
							"|",
							oleDbDataReader.GetString(1),
							"]出错:",
							num.ToString(),
							ex.Message
						}), 1);
						StreamWriter streamWriter = new StreamWriter("err.log", false);
						streamWriter.WriteLine(text);
						streamWriter.Close();
						DataBase dataBase4 = new DataBase();
						dataBase4.ExecuteCmdNonQuery(new OleDbCommand
						{
							CommandText = "update ppcat set flag=10000+flag where cid='" + oleDbDataReader.GetString(0) + "' and flag<100"
						});
						oleDbDataReader.Close();
						dataBase.Close();
						return;
					}
				}
				Application.DoEvents();
				Thread.Sleep(500);
			}
			oleDbDataReader.Close();
			dataBase.Close();
		}
		private void menuItem_15_Click(object sender, EventArgs e)
		{
			DataBase dataBase = new DataBase();
			dataBase.ExecuteCmdNonQuery(new OleDbCommand
			{
				CommandText = "update ppcat set flag=(flag mod 1000) where flag>=1000"
			});
			this.WriteLog("重置错误成功", 1);
		}
		private void menuItem_16_Click(object sender, EventArgs e)
		{
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			oleDbCommand.CommandText = "delete from ppoption where cid in(select cid from ppcat where flag>=10000)";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "delete from ppattr where cid in(select cid from ppcat where flag>=10000)";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "update ppcat set flag=flag mod 10000 where flag>=10000";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.WriteLog("重置错误成功", 1);
		}
		private void menuItem_18_Click(object sender, EventArgs e)
		{
			this.WriteLog("开始停止正在进行的操作", 1);
			this.bStopCurAction = true;
		}
		public CookieContainer Login()
		{
			this.cookie = new CookieContainer();
			string s = "TPL_username=beautifulwomen520&CtrlVersion=1%2C0%2C0%2C7&support=000001&tid=XOR_1_000000000000000000000000000000_63584454317E79077275757E&TPL_password=www.xxptw.com&Submit=%B5%C7+%C2%BC&actionForStable=enable_post_user_action&action=Authenticator&TPL_redirect_url=&event_submit_do_login=anything&abtest=&pstrong=&from=&yparam=&done=";
			Encoding encoding = Encoding.GetEncoding("GB2312");
			byte[] bytes = encoding.GetBytes(s);
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://member1.taobao.com/member/login.jhtml?guest_redirect_url=http%3A%2F%2Fmy.taobao.com%2Fmytaobao%2Fguest%2Fmy_taobao_guest.htm&is_guest_login=1&redirect_url=");
			httpWebRequest.KeepAlive = false;
			httpWebRequest.Method = "POST";
			httpWebRequest.ContentType = "application/x-www-form-urlencoded";
			httpWebRequest.ContentLength = (long)bytes.Length;
			Stream requestStream = httpWebRequest.GetRequestStream();
			requestStream.Write(bytes, 0, bytes.Length);
			requestStream.Close();
			httpWebRequest.CookieContainer = this.cookie;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			this.cookie.Add(httpWebResponse.Cookies);
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
			string text = streamReader.ReadToEnd();
			streamReader.Close();
			if (text.IndexOf("管理我的店铺") > 0)
			{
				this.bool_3 = true;
			}
			else
			{
				this.bool_3 = false;
			}
			return this.cookie;
		}
		private void btnDelShop_Click(object sender, EventArgs e)
		{
			if (this.tvShops.SelectedNode == null)
			{
				this.WriteLog("错误提示:[未选择分类或店铺]请先选择要删除的店铺的宝贝分类或店铺名称", 1);
				return;
			}
			string text;
			if (this.tvShops.SelectedNode.Parent == null)
			{
				text = this.tvShops.SelectedNode.Text;
			}
			else
			{
				if (this.tvShops.SelectedNode.Parent.Parent == null)
				{
					text = this.tvShops.SelectedNode.Parent.Text;
					string arg_85_0 = this.tvShops.SelectedNode.Text;
				}
				else
				{
					text = this.tvShops.SelectedNode.Parent.Parent.Text;
					string arg_B8_0 = this.tvShops.SelectedNode.Parent.Text;
					string arg_C9_0 = this.tvShops.SelectedNode.Text;
				}
			}
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			oleDbCommand.CommandText = "delete from goods where shop='" + text + "'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "delete from subcat where shop='" + text + "'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "delete from cat where shop='" + text + "'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "delete from shops where name='" + text + "'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			this.dgGoods.DataSource = null;
			this.dlkshdWy2();
			this.WriteLog("删除店铺成功", 1);
		}
		private void method_74(object sender, EventArgs e)
		{
		}
        //特殊符号替换
		private string specialSignReplace(string string_12)
		{
			return string_12.Replace("&amp;", "&").Replace("&beta;", "β").Replace("&eacute;", "é").Replace("&uuml;", "ü").Replace("&times;", "×").Replace("&mdash;", "—").Replace("&mdash;", "—").Replace("&ldquo;", "“").Replace("&rdquo;", "”").Replace("&middot;", "·").Replace("&quot;", "\"").Replace("&amp;", "&").Replace("&nbsp;", " ").Replace("&bull;", "：").Replace("&deg;", "°").Replace("&hellip;", "…");
		}
		public string GetPrice(string reslt, string gurl)
		{
			this.decimal_0 = 0m;
			this.string_1 = "";
			string text = "0";
			int num = reslt.IndexOf("name=\"current_price");
			if (num > 0)
			{
				string text2 = reslt.Substring(num + 29);
				text = text2.Substring(0, text2.IndexOf("\"")).Trim();
			}
			else
			{
				num = reslt.IndexOf("id=\"J_StrPrice\"");
				if (num > 0)
				{
					string text2 = reslt.Substring(num);
					text2 = text2.Substring(text2.IndexOf(">") + 1);
					text = text2.Substring(0, text2.IndexOf("<")).Trim();
					if (text.Length < 1)
					{
						num = reslt.IndexOf("J_originalPrice");
						if (num > 0)
						{
							text2 = reslt.Substring(num);
							text2 = text2.Substring(text2.IndexOf(">") + 1);
							text = text2.Substring(0, text2.IndexOf("<")).Trim();
						}
					}
				}
				else
				{
					num = reslt.IndexOf("起始价格：");
					if (num >= 0)
					{
						string text2 = reslt.Substring(num);
						text2 = text2.Substring(text2.IndexOf("price") + 7);
						text = text2.Substring(0, text2.IndexOf("<")).Trim();
					}
					else
					{
						num = reslt.IndexOf("价格：<em>");
						if (num > 0)
						{
							string text2 = reslt.Substring(num + 7, 50);
							text = text2.Substring(0, text2.IndexOf("<"));
						}
						else
						{
							if (reslt.IndexOf("'reservePrice'") > 0)
							{
								string text2 = reslt.Substring(reslt.IndexOf("'reservePrice'") + 18, 50);
								text = text2.Substring(0, text2.IndexOf("'"));
							}
							else
							{
								if (reslt.IndexOf(">￥") > 0)
								{
									string text2 = reslt.Substring(reslt.IndexOf(">￥") + 2, 50);
									text = text2.Substring(0, text2.IndexOf("<")).Trim();
								}
								else
								{
									if (reslt.IndexOf("class=\"J_originalPrice") > 0)
									{
										string text2 = reslt.Substring(reslt.IndexOf("class=\"J_originalPrice") + 2, 100);
										text2 = text2.Substring(text2.IndexOf(">") + 1);
										text = text2.Substring(0, text2.IndexOf("<")).Trim();
									}
								}
							}
						}
					}
				}
			}
			if (text.IndexOf("-") > 0)
			{
				text = text.Substring(0, text.IndexOf("-")).Trim();
			}
			if (!this.ckNoPromote.Checked)
			{
				string promotePrice = this.GetPromotePrice(reslt, gurl);
				if (promotePrice.Length > 0)
				{
					try
					{
						decimal num2 = decimal.Parse(text);
						decimal d = decimal.Parse(promotePrice);
						if (d < num2 || num2 == 0m)
						{
							this.decimal_0 = d;
						}
					}
					catch (Exception)
					{
					}
					text = promotePrice;
				}
			}
			return text;
		}
		private string method_76(string string_12)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
			httpWebRequest.KeepAlive = false;
			httpWebRequest.CookieContainer = this.cookie;
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			this.cookie.Add(httpWebResponse.Cookies);
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.GetEncoding("gb2312"));
			string result = streamReader.ReadToEnd();
			streamReader.Close();
			httpWebResponse.Close();
			return result;
		}
		private string method_77(string string_12, string string_13)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
			httpWebRequest.CookieContainer = this.cookie;
			httpWebRequest.Referer = string_13;
			httpWebRequest.KeepAlive = false;
			httpWebRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; Maxthon; .NET CLR 1.1.4322; CIBA; .NET CLR 2.0.50727; Alexa Toolbar; GreenBrowser)";
			HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
			this.cookie.Add(httpWebResponse.Cookies);
			Stream responseStream = httpWebResponse.GetResponseStream();
			StreamReader streamReader = new StreamReader(responseStream, Encoding.GetEncoding("gb2312"));
			string result = streamReader.ReadToEnd();
			streamReader.Close();
			httpWebResponse.Close();
			return result;
		}
		public string GetPromotePrice(string slt, string gurl)
		{
			string result = "";
			try
			{
				int num = slt.IndexOf("http://mdskip.taobao.com/core/initItemDetail.htm");
				if (num > 0)
				{
					this.method_76(gurl);
					string text = slt.Substring(num);
					text = text.Substring(0, text.IndexOf("\"")).Replace("&amp;", "&").TrimEnd(new char[]
					{
						'&'
					}) + "&callback=onMdskip&ref=&brandSiteId=0";
					while (true)
					{
						slt = this.method_77(text, gurl);
						if (text.IndexOf("&callback=onMdskip&ref=&brandSiteId=0") <= 0)
						{
							break;
						}
						if (slt.IndexOf("isSuccess\":false") <= 0)
						{
							break;
						}
						text.Replace("&callback=onMdskip&ref=&brandSiteId=0", "&callback=setMdskip");
					}
					try
					{
						StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\gpp.txt", false);
						streamWriter.Write(slt);
						streamWriter.Close();
					}
					catch (Exception)
					{
					}
					this.string_1 = slt;
					int num2 = this.string_1.IndexOf("priceInfo");
					if (num2 > 0)
					{
						this.string_1 = this.string_1.Substring(num2);
					}
					decimal num3 = 0m;
					for (int i = slt.IndexOf("\"price\":\""); i > 0; i = slt.IndexOf("\"price\":\""))
					{
						slt = slt.Substring(i + 9);
						string s = slt.Substring(0, slt.IndexOf("\""));
						try
						{
							decimal num4 = decimal.Parse(s);
							if (num4 < num3 || num3 == 0m)
							{
								num3 = num4;
							}
						}
						catch (Exception)
						{
						}
					}
					if (num3 > 0m)
					{
						result = num3.ToString();
					}
				}
			}
			catch (Exception)
			{
			}
			return result;
		}
		private string method_78(string string_12)
		{
			string text = string_12;
			StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\catsrc.txt", false);
			streamWriter.WriteLine(string_12);
			streamWriter.Close();
			string_12 = string_12.Replace("category=item%5f", "category=item_");
			int num = string_12.IndexOf("category=item_");
			if (num > 0)
			{
				string text2 = string_12.Substring(num + 14, 50);
				return text2.Substring(0, text2.IndexOf("&"));
			}
			num = string_12.IndexOf("category=item%5f");
			if (num > 0)
			{
				string text2 = string_12.Substring(num + 16, 50);
				return text2.Substring(0, text2.IndexOf("&"));
			}
			num = string_12.IndexOf("'categoryId':'");
			if (num > 0)
			{
				string text2 = string_12.Substring(num + 14, 50);
				return text2.Substring(0, text2.IndexOf("'"));
			}
			num = string_12.IndexOf("catId=");
			if (num < 0)
			{
				num = string_12.IndexOf("catid=");
			}
			string text3;
			if (num > 0)
			{
				string text2 = string_12.Substring(num + 7);
				text3 = text2.Substring(0, text2.IndexOf("\""));
			}
			else
			{
				num = string_12.LastIndexOf("search?cat=");
				if (num > 0)
				{
					string text2 = string_12.Substring(string_12.LastIndexOf("search?cat=") + 11);
					text3 = text2.Substring(0, text2.IndexOf("\""));
				}
				else
				{
					if (string_12.IndexOf(">手机类型：") >= 0)
					{
						text3 = "1512";
					}
					else
					{
						text3 = "";
					}
				}
			}
			if (text3.Trim().Length < 1)
			{
				int num2 = text.IndexOf(" cid:'");
				if (num2 > 0)
				{
					string text4 = text.Substring(num2 + 6);
					return text4.Substring(0, text4.IndexOf("'"));
				}
				num2 = text.IndexOf("data-catid =");
				if (num2 > 0)
				{
					string text5 = text.Substring(num2 + 13);
					return text5.Substring(0, text5.IndexOf("\""));
				}
				num2 = text.IndexOf("?catpath=");
				if (num2 > 0)
				{
					string text6 = text.Substring(num2);
					text6 = text6.Substring(0, text6.IndexOf("\""));
					return text6.Substring(text6.LastIndexOf("-") + 1);
				}
			}
			return text3;
		}
		public string GetItemDescUrl(string reslt, string name)
		{
			int num = reslt.IndexOf(name);
			string text2;
			if (num > 0)
			{
				string text = reslt.Substring(reslt.IndexOf("apiItemDesc") + 14);
				text2 = text.Substring(0, text.IndexOf("\""));
			}
			else
			{
				num = reslt.IndexOf(".desc|var");
				if (num >= 0)
				{
					string text = reslt.Substring(0, num + 120);
					num = text.IndexOf("\"descPath\":");
					if (num > 0)
					{
						text = text.Substring(num + 12).Replace("'", "\"");
					}
					else
					{
						text = text.Substring(text.LastIndexOf("http://")).Replace("'", "\"");
					}
					text2 = text.Substring(0, text.IndexOf("\""));
					if (!text2.StartsWith("http://"))
					{
						text2 = "http://" + text2;
					}
				}
				else
				{
					num = reslt.IndexOf("http://dsc");
					string text = reslt.Substring(num);
					text2 = text.Substring(0, text.IndexOf("'"));
					if (text2.IndexOf("\"") > 0)
					{
						text2 = text.Substring(0, text.IndexOf("\""));
					}
				}
			}
			return text2.Replace("\\/", "/");
		}
		private Encoding method_79(string string_12)
		{
			Encoding result = Encoding.Default;
			string_12 = string_12.ToLower();
			if (string_12.IndexOf("charset=utf-8") > 0)
			{
				result = Encoding.UTF8;
			}
			else
			{
				if (string_12.IndexOf("charset=gbk") > 0)
				{
					result = Encoding.GetEncoding("gbk");
				}
				else
				{
					if (string_12.IndexOf("charset=gb2312") > 0)
					{
						result = Encoding.GetEncoding("gb2312");
					}
				}
			}
			return result;
		}
		public bool isWin8()
		{
			Version version = Environment.OSVersion.Version;
			Version value = new Version("6.2");
			return version.CompareTo(value) >= 0;
		}
		public string GetDStockStr(string slt0)
		{
			string result = "";
            int num = slt0.IndexOf("http://detailskip.taobao.com/json/sib.htm");
			if (num > 0)
			{
				string text = slt0.Substring(num);
				text = text.Substring(0, text.IndexOf("\""));
				try
				{
					result = this.method_13(text);
				}
				catch (Exception)
				{
				}
			}
			return result;
		}
		public string method_80(string stockid, string colorid, string sizeid, string dstock)
		{
			if (dstock.IndexOf("stock") < 0)
			{
				return stockid;
			}
			string text = string.Concat(new string[]
			{
				";",
				colorid,
				";",
				sizeid,
				";"
			});
			string text2 = string.Concat(new string[]
			{
				";",
				sizeid,
				";",
				colorid,
				";"
			});
			text = text.Replace(";;", ";");
			text2 = text2.Replace(";;", ";");
			int num = dstock.IndexOf(text);
			if (num < 0)
			{
				num = dstock.IndexOf(text2);
			}
			if (num < 0)
			{
				return "0";
			}
			dstock = dstock.Substring(num);
			dstock = dstock.Substring(dstock.IndexOf("stock") + 7);
			dstock = dstock.Substring(dstock.IndexOf("\"") + 1);
			stockid = dstock.Substring(0, dstock.IndexOf("\""));
			return stockid;
		}
        //获取数量
		public string GetDQuantity(string quantity, string dstock)
		{
			if (dstock.IndexOf("stock") < 0)
			{
				return quantity;
			}
			dstock = dstock.Substring(dstock.IndexOf("\"stock\":") + 8);
			dstock = dstock.Substring(dstock.IndexOf("\"") + 1);
			quantity = dstock.Substring(0, dstock.IndexOf("\""));
			return quantity;
		}
		public void delprop()
		{
			try
			{
				string[] array = this.string_8[3].Split(new char[]
				{
					','
				});
				int num = int.Parse(array[4]);
				if (this.winVersionNum <= num)
				{
					DataBase dataBase = new DataBase();
					OleDbCommand oleDbCommand = new OleDbCommand("delete from [ppcat]");
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
					oleDbCommand.CommandText = "delete from ppattr";
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
					oleDbCommand.CommandText = "delete from ppoption";
					dataBase.ExecuteCmdNonQuery(oleDbCommand);
				}
			}
			catch (Exception)
			{
			}
		}
		public string DecodeHtmChar(string src)
		{
			return src.Replace("&Phi;", "Φ").Replace("Phi", "Φ");
		}
		public string GetGname(string reslt)
		{
			int num = reslt.IndexOf("\"title\":\"");
			string text2;
			if (num > 0)
			{
				string text = reslt.Substring(num + 9, 300);
				text2 = text.Substring(0, text.IndexOf("\""));
				if (text2.Length > 0)
				{
					return text2;
				}
			}
			num = reslt.IndexOf("name=\"title");
			if (num > 0)
			{
				string text = reslt.Substring(num + 20, 300);
				text2 = text.Substring(0, text.IndexOf("\""));
			}
			else
			{
				num = reslt.IndexOf("class=\"tb-detail-hd");
				string text = reslt.Substring(num);
				text = text.Substring(text.IndexOf("<h3>") + 6);
				text = text.Substring(text.IndexOf(">") + 1);
				text2 = text.Substring(0, text.IndexOf("<"));
			}
			return text2;
		}
		private void method_81()
		{
			this.TrimSellPropAliasOrNot();
			this.delprop();
			if (this.method_54())
			{
                Process.Start("http://www.917e.com/soft/cracked.htm");
				this.ExitApp();
			}
			int num = 0;
			if (this.method_53())
			{
                Process.Start("http://www.91585.com/soft/cracked.htm");
				this.ExitApp();
			}
			if ((this.txtRegCode.Text.Trim().Length > 1 || this.Text.IndexOf("已注册") > 0 || this.Text.IndexOf("注册") < 0) && !this.NeedVerifyRegCode())
			{
				string[] array = this.string_8[2].Split(new char[]
				{
					','
				});
				int num2 = int.Parse(array[0]);
				if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[1]) && this.txtRegCode.Text.Trim().Length > 2)
				{
					return;
				}
				num2 = int.Parse(array[2]);
				if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[3]) && this.txtRegCode.Text.Trim().Length > 2)
				{
					return;
				}
				num2 = int.Parse(array[4]);
				if (!this.txtRegCode.Text.Trim().Substring(num2 % 32, 1).Equals(array[5]) && this.txtRegCode.Text.Trim().Length > 2)
				{
					return;
				}
			}
			if (!this.regString[0].Equals(this.GetMachineCode()) && !this.txtMachineCode.Text.Trim().Equals(this.GetMachineCode()))
			{
				this.ShowNoRegMessage();
				return;
			}
			string text = this.txtGoods.Text.Trim();
			int num3 = 0;
			this.bStopCurAction = false;
			if (!this.VerifyRegCode())
			{
				this.ShowNoRegMessage();
				return;
			}
			Regex regex = new Regex("^[0-9]+(.[0-9]+)?$");
			if (!regex.IsMatch(this.txtPriceMul.Text.Trim()))
			{
				MessageBox.Show(this, "价格调整乘数系数设置有误，需为正数");
				this.txtPriceMul.Focus();
				return;
			}
			if (text.Length < 10)
			{
				this.WriteLog("请在文本框中输入要复制的商品地址,每行一个商品", 1);
				return;
			}
			string[] array2 = text.Split(new char[]
			{
				'\n'
			});
			int num4 = 0;
			int i = 0;
			while (i < array2.Length)
			{
				array2[i] = array2[i].Trim();
				if (array2[i].Length <= 10 || !array2[i].ToLower().StartsWith("http://"))
				{
					i++;
				}
				else
				{
					num4++;
					IL_2A7:
					if (num4 == 0)
					{
						this.WriteLog("您输入的商品地址都不正确,请输入正确的商品地址", 1);
						return;
					}
					this.tabCtl.SelectedTab = this.tabLog;
					if (this.string_8.Length < 4)
					{
						this.ShowNoRegMessage();
						return;
					}
					string[] array3 = this.string_8[3].Split(new char[]
					{
						','
					});
					SaveFileDialog saveFileDialog = new SaveFileDialog();
					saveFileDialog.Filter = "csv文件|*.csv";
					if (saveFileDialog.ShowDialog() == DialogResult.OK)
					{
						string fileName = saveFileDialog.FileName;
						string text2 = fileName.ToLower().Replace(".csv", "");
						text2 = text2.Substring(text2.LastIndexOf("\\") + 1);
						if (text2.IndexOf(".") >= 0)
						{
							MessageBox.Show("导出的文件名不能有点号，如不能像这样的：10.26");
							return;
						}
						string directoryName = Path.GetDirectoryName(fileName);
						Encoding unicode = Encoding.Unicode;
						StreamWriter streamWriter = new StreamWriter(fileName, false, unicode);
						if (this.ckLowVer.Checked)
						{
							string value = "宝贝名称\t宝贝类目\t店铺类目\t新旧程度\t省\t城市\t出售方式\t宝贝价格\t加价幅度\t宝贝数量\t有效期\t运费承担\t平邮\tEMS\t快递\t付款方式\t支付宝\t发票\t保修\t自动重发\t放入仓库\t橱窗推荐\t开始时间\t心情故事\t宝贝描述\t宝贝图片\t宝贝属性\t团购价\t最小团购件数\t邮费模版ID\t会员打折\t修改时间\t上传状态\t图片状态\t返点比例\t新图片\t视频\t销售属性组合\t用户输入ID串\t用户输入名-值对\t商家编码\t销售属性别名\t代充类型\t宝贝编号\t食品专项";
							streamWriter.WriteLine(value);
						}
						else
						{
							string value = "version 1.00\ntitle\tcid\tseller_cids\tstuff_status\tlocation_state\tlocation_city\titem_type\tprice\tauction_increment\tnum\tvalid_thru\tfreight_payer\tpost_fee\tems_fee\texpress_fee\thas_invoice\thas_warranty\tapprove_status\thas_showcase\tlist_time\tdescription\tcateProps\tpostage_id\thas_discount\tmodified\tupload_fail_msg\tpicture_status\tauction_point\tpicture\tvideo\tskuProps\tinputPids\tinputValues\touter_id\tpropAlias\tauto_fill\tnum_id\tlocal_cid\tnavigation_type\tuser_name\tsyncStatus\tis_lighting_consigment\tis_xinpin\tfoodparame\tfeatures\tglobal_stock_type\tsub_stock_type\titem_size\titem_weight\tsell_promise\tcustom_design_flag\twireless_desc";
							streamWriter.WriteLine(value);
							value = "宝贝名称\t宝贝类目\t店铺类目\t新旧程度\t省\t城市\t出售方式\t宝贝价格\t加价幅度\t宝贝数量\t有效期\t运费承担\t平邮\tEMS\t快递\t发票\t保修\t放入仓库\t橱窗推荐\t开始时间\t宝贝描述\t宝贝属性\t邮费模版ID\t会员打折\t修改时间\t上传状态\t图片状态\t返点比例\t新图片\t视频\t销售属性组合\t用户输入ID串\t用户输入名-值对\t商家编码\t销售属性别名\t代充类型\t数字ID\t本地ID\t宝贝分类\t用户名称\t宝贝状态\t闪电发货\t新品\t食品专项\t尺码库\t库存类型\t库存计数\t物流体积\t物流重量\t退换货承诺\t定制工具\t无线详情";
							streamWriter.WriteLine(value);
						}
						if (this.method_54())
						{
                            Process.Start("http://www.917e.com/soft/cracked.htm");
							this.ExitApp();
						}
						if (this.method_53())
						{
                            Process.Start("http://www.91585.com/soft/cracked.htm");
							this.ExitApp();
						}
						int num5 = 0;
						while (num5 < array2.Length && !this.bStopCurAction)
						{
							array2[num5] = array2[num5].Trim();
							int num6 = 5;
							if (num5 % 20 == 3 && this.method_54())
							{
                                Process.Start("http://www.917e.com/soft/cracked.htm");
								this.ExitApp();
							}
							if (this.bStopCurAction)
							{
								this.WriteLog("您点击了停止操作，程序已停止导出", 1);
								streamWriter.Close();
								return;
							}
							if (!this.VerifyRegCode() && num5 == 2)
							{
								streamWriter.Close();
                                MessageBox.Show("未注册版只能导出2个宝贝，已成功导2个宝贝，本软件将关闭，若需注册请与我们联系。");
								this.ExitApp();
							}
							if (this.txtRegCode.Text.Trim().Length < 1 && num5 == 2)
							{
								return;
							}
							if ((this.txtRegCode.Text.Trim().Length > 1 || this.Text.IndexOf("已注册") > 0 || this.Text.IndexOf("注册") < 0) && num5 == 2 && !this.NeedVerifyRegCode())
							{
								try
								{
									string[] array4 = this.string_8[2].Split(new char[]
									{
										','
									});
									int num7 = int.Parse(array4[0]);
									if (!this.txtRegCode.Text.Trim().Substring(num7 % 32, 1).Equals(array4[1]))
									{
										return;
									}
									num7 = int.Parse(array4[2]);
									if (!this.txtRegCode.Text.Trim().Substring(num7 % 32, 1).Equals(array4[3]))
									{
										return;
									}
									num7 = int.Parse(array4[4]);
									if (!this.txtRegCode.Text.Trim().Substring(num7 % 32, 1).Equals(array4[5]))
									{
										return;
									}
								}
								catch (Exception)
								{
									this.ShowNoRegMessage();
									return;
								}
							}
							if (this.regString[0].Equals(this.GetMachineCode()) || this.txtMachineCode.Text.Trim().Equals(this.GetMachineCode()))
							{
								if (num5 % 20 == 3 && this.method_54())
								{
                                    Process.Start("http://www.917e.com/soft/cracked.htm");
									this.ExitApp();
								}
								Application.DoEvents();
								if (!this.bStopCurAction)
								{
									if (array2[num5].Length > 10 && array2[num5].ToLower().StartsWith("http://"))
									{
										Thread.Sleep(500);
										string text3 = array2[num5].Trim();
										string text4 = array2[num5];
										string text5 = text4;
										string text6 = "";
										if (this.ckNoCopied.Checked)
										{
											try
											{
												text6 = text5.Substring(text5.IndexOf("id=") + 3);
												if (text6.IndexOf("&") > 0)
												{
													text6 = text6.Substring(0, text6.IndexOf("&"));
												}
												text6 = text6.Trim();
												DataBase dataBase = new DataBase("copied.mdb");
												OleDbCommand cmd = new OleDbCommand("select * from goods where url='" + text6 + "'");
												int num8 = 0;
												dataBase.Open();
												OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(cmd);
												if (oleDbDataReader.Read())
												{
													num8 = 1;
												}
												oleDbDataReader.Close();
												dataBase.Close();
												if (num8 == 1)
												{
													this.WriteLog("您勾选了选项10“不复制已复制过的商品”且商品[" + text5 + "]在已复制过的商品地址列表，跳过该商品", 1);
													goto IL_2F69;
												}
											}
											catch (Exception)
											{
											}
										}
										Application.DoEvents();
										this.WriteLog(string.Concat(new object[]
										{
											"开始下载宝贝[",
											text3,
											"]",
											num5
										}), 1);
										this.cookie = new CookieContainer();
										int num9 = text5.IndexOf("&id=");
										if (num9 > 0)
										{
											string str = text5.Substring(0, text5.IndexOf("?") + 1);
											text5 = text5.Substring(num9 + 4);
											if (text5.IndexOf("&") > 0)
											{
												text5 = text5.Substring(0, text5.IndexOf("&"));
											}
											text5 = str + "&id=" + text5;
										}
										int num10 = text5.IndexOf("&rn=");
										if (num10 > 0)
										{
											string text7 = text5.Substring(0, num10);
											text5 = text5.Substring(num10 + 1);
											num10 = text5.IndexOf("&");
											if (num10 > 0)
											{
												text7 += text5.Substring(num10);
											}
											text5 = text7;
										}
										int num11 = 1;
										while (true)
										{
											Application.DoEvents();
											try
											{
												Application.DoEvents();
												string text8 = "";
												string referer;
												if (text5.IndexOf("tmall") > 0)
												{
													referer = "http://list.tmall.com";
												}
												else
												{
													referer = "http://www.taobao.com";
												}
												string text9 = "";
												string dStockStr;
												while (true)
												{
													HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(text5);
													httpWebRequest.Referer = referer;
													httpWebRequest.Timeout = 45000;
													HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
													httpWebRequest.AllowAutoRedirect = true;
													Stream responseStream = httpWebResponse.GetResponseStream();
													StreamReader streamReader = new StreamReader(responseStream, Encoding.Default);
													text9 = streamReader.ReadToEnd();
													streamReader.Close();
													httpWebResponse.Close();
													string slt = text9;
													text9 = Form1.htmlToLower(text9);
													Application.DoEvents();
													Application.DoEvents();
													dStockStr = this.GetDStockStr(slt);
													StreamWriter streamWriter2 = new StreamWriter(Application.StartupPath + "\\9.txt", false, Encoding.Default);
													streamWriter2.Write(text9);
													streamWriter2.Close();
													if (text9.IndexOf("window.location.href='http://meal.taobao.com/item.htm") <= 0)
													{
														break;
													}
													text5 = text5.Replace("item.taobao.com", "meal.taobao.com");
												}
												num3++;
												string text10 = "";
												string text11 = "";
												text11 = this.method_78(text9);
												num3 = 2000;
												Application.DoEvents();
												string text12 = "";
												int j = text9.IndexOf("宝贝类型：</span><em>");
												if (j > 0)
												{
													text10 = text9.Substring(j + 16, 20);
													num3++;
													text10 = text10.Substring(0, text10.IndexOf("<"));
													num3++;
													if (text10.Equals("闲置"))
													{
														text12 = "2";
													}
													else
													{
														if (text10.Equals("二手"))
														{
															text12 = "1";
														}
														else
														{
															text12 = "0";
														}
													}
												}
												else
												{
													text12 = "0";
												}
												Application.DoEvents();
												num3++;
												string text13 = "b";
												j = text9.IndexOf("auction_type\" value=");
												if (j > 0)
												{
													text10 = text9.Substring(j + 21, 20);
													text13 = text10.Substring(0, text10.IndexOf("\""));
												}
												num3++;
												string text14 = "";
												text14 = this.GetPrice(text9, text5);
												num3 = 9900;
												int num12 = 0;
												float num13 = 1f;
												try
												{
													num12 = (int)this.nPriceAdd.Value;
												}
												catch (Exception)
												{
													num12 = 0;
												}
												try
												{
													num13 = float.Parse(this.txtPriceMul.Text.Trim());
												}
												catch (Exception)
												{
													num13 = 1f;
												}
												if (num12 == 0)
												{
													if (num13 == 1f)
													{
														goto IL_B3D;
													}
												}
												try
												{
													float num14 = float.Parse(text14);
													if (num14 + (float)num12 > 0f)
													{
														num14 += (float)num12;
													}
													text14 = (num14 * num13).ToString();
												}
												catch (Exception)
												{
												}
												IL_B3D:
												num3 = 9901;
												text3 = this.GetGname(text9);
												num3 = 9902;
												text3 = this.specialSignReplace(text3);
												j = text9.IndexOf("加价幅度：");
												string string_ = "0";
												num3 = 9902 + 1;
												if (j > 0)
												{
													text10 = text9.Substring(j);
													text10 = text10.Substring(text10.IndexOf("price") + 7);
													string_ = text10.Substring(0, text10.IndexOf("<")).Trim();
												}
												num3++;
												string text15 = "2000";
												j = text9.IndexOf("allow_quantity");
												if (j > 0)
												{
													text10 = text9.Substring(j + 23, 50);
													text15 = text10.Substring(0, text10.IndexOf("\""));
												}
												else
												{
													j = text9.IndexOf("virtQuantity:");
													if (j > 0)
													{
														text10 = text9.Substring(j + 14);
														text15 = text10.Substring(0, text10.IndexOf("'"));
													}
												}
												if (text15.Length < 1)
												{
													text15 = "2000";
												}
												text15 = this.GetDQuantity(text15, dStockStr);
												num3++;
												Application.DoEvents();
												string text16 = "";
												string text17 = "1";
												try
												{
													text10 = text9.Substring(text9.IndexOf("who_pay_ship") + 21, 100);
													text17 = text10.Substring(0, text10.IndexOf("\"")).Trim();
													text16 = text17;
													if (text17.Equals("卖家承担运费"))
													{
														text17 = "2";
														j = text9.IndexOf("运\u3000\u3000费：");
														if (j > 0)
														{
															text10 = text9.Substring(j);
															text10 = text10.Substring(0, text10.IndexOf("</li>"));
															if (text10.IndexOf("读取中") > 0)
															{
																text17 = "1";
															}
														}
													}
													else
													{
														text17 = "1";
													}
												}
												catch (Exception)
												{
												}
												Application.DoEvents();
												num3 = 1000;
												j = text16.IndexOf("平邮:");
												string string_2 = "10";
												string string_3 = "15";
												string winTitle = "20";
												if (j > 0)
												{
													this.WriteLog(text16, 1);
													text16 = text16.Substring(text16.IndexOf("平邮:") + 4);
													num3++;
													string_2 = text16.Substring(0, text16.IndexOf("元"));
													num3++;
													text16 = text16.Substring(text16.IndexOf("快递:") + 4);
													num3++;
													string_3 = text16.Substring(0, text16.IndexOf("元"));
													num3++;
													text16 = text16.Substring(text16.IndexOf("EMS:") + 5);
													num3++;
													winTitle = text16.Substring(0, text16.IndexOf("元"));
													num3++;
												}
												Application.DoEvents();
												num3 = 1001;
												string text18 = "";
												text18 = this.GetItemDescUrl(text9, code.decode(array3[2]));
												this.WriteLog("读取商品页面信息成功，开始读取商品描述信息", 1);
												num3 = 2221002;
												Application.DoEvents();
												Random random = new Random((int)DateTime.Now.Ticks);
												string text19 = "";
												Application.DoEvents();
												string text20 = "";
												try
												{
													text20 = this.method_17(text18, text5);
													if (text20.IndexOf("desc=") < 0)
													{
														text20 = this.cjxGetUseCookieGzip(text18, (num11 == 1) ? (text5 + ((random.Next(1, 2) == 2) ? ("&t=" + random.ToString()) : "")) : "", Encoding.GetEncoding("gbk"), ref text19);
														Application.DoEvents();
														this.cookiestr = "";
													}
												}
												catch (Exception)
												{
													for (int k = 0; k < 100; k++)
													{
														Thread.Sleep(50);
														Application.DoEvents();
													}
													num11 = (num11 + 1) % 2;
													continue;
												}
												try
												{
													StreamWriter streamWriter3 = new StreamWriter(Application.StartupPath + "\\desc0.txt", false, Encoding.GetEncoding("gbk"));
													streamWriter3.WriteLine(text18);
													streamWriter3.WriteLine(text20);
													streamWriter3.Close();
												}
												catch (Exception)
												{
												}
												if (text20.IndexOf("Bad Request<") <= 0 && text20.IndexOf("Bad request") <= 0 && text20.IndexOf(">Host Header Required<") <= 0 && text20.IndexOf("HTTP/1.1 404 Not Found") < 0)
												{
													this.WriteLog("读取商品描述信息成功", 1);
													num11 = 1;
													num3 = 2221003;
													Application.DoEvents();
													num3 = 1003;
													text20 = text20.Substring(text20.IndexOf("desc=") + 6);
													num3 = 1004;
													text20 = text20.Substring(0, text20.IndexOf("';"));
													num3 = 1005;
													if (text9.IndexOf("TShop.renderDesc(desc);") > 0)
													{
														int num15 = text9.IndexOf("<div id=\"description");
														if (num15 >= 0)
														{
															string text21 = text9.Substring(0, num15);
															if (text21.Length > 28)
															{
																text21 = text21.Substring(0, text21.Length - 27);
																num15 = text21.LastIndexOf("custom-area\">");
																if (num15 >= 0)
																{
																	text21 = text21.Substring(num15 + 13);
																	if (text20.IndexOf(">--------------------------------------------------------------------------</div>") > 0)
																	{
																		text20 = text20.Replace("--------------------------------------------------------------------------", text21);
																	}
																}
															}
														}
													}
													num3 = 1006;
													text20 = text20.Replace("\"", "\"\"").Replace("\r", "").Replace("\n", "").Replace("\\", "");
													if (this.ckDelHref.Checked)
													{
														text20 = this.method_57(text20);
													}
													else
													{
														if (this.ckDelOnlyHref.Checked)
														{
															text20 = this.method_58(text20);
														}
													}
													num3 = 1007;
													Application.DoEvents();
													int num16 = text9.IndexOf("J_ImgBooth");
													if (num16 < 0)
													{
														num16 = text9.IndexOf("booth pic");
														text10 = text9.Substring(num16);
														text10 = text10.Substring(text10.IndexOf("src=") + 5);
													}
													else
													{
														num3 = 1008;
														text10 = text9.Substring(num16);
														text10 = text10.Substring(0, text10.IndexOf(">"));
														num3 = 1009;
														text10 = text10.Substring(text10.IndexOf("src=") + 5);
														if (!text10.StartsWith("http://"))
														{
															num3 = 1010;
															text10 = text9.Substring(0, text9.IndexOf("J_ImgBooth"));
															num3 = 1011;
															text10 = text10.Substring(text10.LastIndexOf("http://"));
														}
													}
													num3 = 200000;
													string text22 = text10.Substring(0, text10.IndexOf("\""));
													if (text22.IndexOf("jpg_") > 0)
													{
														text22 = text22.Substring(0, text22.LastIndexOf("_"));
													}
													text10 = fileName.Substring(fileName.LastIndexOf("\\") + 1);
													text10 = text10.Substring(0, text10.IndexOf("."));
													string text23 = directoryName + "\\" + text10;
													if (!Directory.Exists(text23))
													{
														this.WriteLog("创建图片文件夹：" + text23, 1);
														Directory.CreateDirectory(text23);
													}
													Application.DoEvents();
													string text24 = Form1.GetMD5(text22, this.string_2).ToLower();
													string text25 = text23 + "\\" + text24 + ".tbi";
													string text26 = text24 + ".tbi";
													if (!this.ckPP.Checked)
													{
														text26 = text25;
													}
													text22 = text22.Trim();
													num3++;
													Application.DoEvents();
													this.int_2 = 0;
													this.WriteLog("开始下载主图", 1);
													this.int_3 = 1;
													this.method_50(text22, text25, text5);
													this.WriteLog("下载主图成功", 1);
													this.int_2 = 1;
													Application.DoEvents();
													num3 = 200003;
													this.WriteLog("开始处理商品描述图片", 1);
													text20 = this.method_86(text23, text20, text5);
													this.WriteLog("商品描述图片处理完成", 1);
													text20 = this.method_59(text20);
													num3 = 200004;
													Application.DoEvents();
													StreamWriter streamWriter4 = new StreamWriter(Application.StartupPath + "\\10.txt", false, Encoding.Default);
													streamWriter4.Write(text9);
													streamWriter4.Close();
													string text27 = "";
													if (this.ckLowVer.Checked)
													{
														text27 = ":0:0:|;";
													}
													else
													{
														text27 = ":1:0:|;";
													}
													j = text9.IndexOf("<ul id=\"J_UlThumb");
													num3 = 200005;
													Application.DoEvents();
													if (j > 0 && this.ckMultiPic.Checked)
													{
														text10 = text9.Substring(j);
														text10 = text10.Substring(0, text10.IndexOf("</ul>"));
														num3 = 200006;
														j = text10.IndexOf("<li ");
														int num17 = 0;
														while (j > 0)
														{
															text10 = text10.Substring(j);
															text10 = text10.Substring(text10.IndexOf("http://"));
															num3 = 200007;
															string text28 = text10.Substring(0, text10.IndexOf("\""));
															num3 = 2000080;
															int num18 = text28.LastIndexOf("_");
															if (num18 > 0)
															{
																text28 = text28.Substring(0, num18);
															}
															else
															{
																num3 = 2000081;
																text28 = text28.Substring(0, text28.IndexOf(".jpg"));
																text28 = text28.Substring(0, text28.IndexOf(".jpg")) + ".jpg";
															}
															if (text28.Equals(text22))
															{
																j = text10.IndexOf("<li ");
															}
															else
															{
																text28 = text28.Replace("_40x40.jpg", "");
																this.WriteLog(text28, 1);
																num3 = 200009;
																string text29 = Form1.GetMD5(text28, this.string_2).ToLower();
																string winVersion = text23 + "\\" + text29 + ".tbi";
																num3 = 200010;
																string text30 = this.method_50(text28, winVersion, text5);
																if (text30.Length > 0)
																{
																	num17++;
																	if (this.ckLowVer.Checked)
																	{
																		string text31 = text27;
																		text27 = string.Concat(new string[]
																		{
																			text31,
																			text29,
																			":0:",
																			num17.ToString(),
																			":|;"
																		});
																	}
																	else
																	{
																		string text31 = text27;
																		text27 = string.Concat(new string[]
																		{
																			text31,
																			text29,
																			":1:",
																			num17.ToString(),
																			":|;"
																		});
																	}
																	this.int_2++;
																}
																j = text10.IndexOf("<li ");
															}
														}
													}
													Application.DoEvents();
													string text32 = this.ckStock.Checked ? "2" : "0";
													num3++;
													j = text9.LastIndexOf("attributes-list");
													text9 = text9.Replace("<LI", "<li").Replace("</LI>", "</li>").Replace("<DIV", "<div").Replace("DIV>", "div>").Replace("<SPAN", "<span").Replace("SPAN>", "span>").Replace("<EM", "<em").Replace("EM>", "em>").Replace("VALUE=", "value=").Replace("</A>", "</a>").Replace("BACKGROUND:URL(", "background:url(");
													text10 = "";
													if (j > 0)
													{
														text10 = text9.Substring(j);
														j = text10.IndexOf("<li");
														if (j > 0)
														{
															text10 = text10.Substring(j - 1);
														}
														num3++;
														text10 = text10.Substring(0, text10.IndexOf("</div>"));
														num3 = 20000;
													}
													this.prop_type = 1;
													if (text11.Equals("1512") && text9.IndexOf(">更多参数<") > 0)
													{
														text10 = text9.Substring(text9.IndexOf(">包装和参数<"));
														text10 = text10.Substring(0, text10.IndexOf("</tbody>"));
														this.prop_type = 2;
													}
													string attrstr = "";
													if (text11.Equals("50005174"))
													{
														if (text3.IndexOf("N1100") > 0)
														{
															text10 = text10.Replace("N1100", "M-6600A");
															text3 = text3.Substring(0, text3.Length - 11) + "TVIX M-6600A";
														}
														else
														{
															if (text3.IndexOf("图美V9") >= 0)
															{
																text10 = text10.Replace("V9", "高清王V8");
																text3 = text3.Replace("图美", "").Replace("高清王", "").Replace("V9", "").Replace(" ", "") + "图美 高清王V8";
															}
															else
															{
																if (text3.IndexOf("P8126S") >= 0)
																{
																	text10 = text10.Replace("P8126S", "P8126");
																	text3 = text3.Replace("P8126S", "P8126");
																}
																else
																{
																	if (text3.IndexOf("300B") >= 0)
																	{
																		text10 = text10.Replace("300B", "HD300C");
																		text3 = text3.Replace("HD", "").Replace("300B", "HD300C");
																	}
																	else
																	{
																		if (text3.IndexOf("500B") >= 0)
																		{
																			text10 = text10.Replace("500B", "HD8A");
																			text3 = text3.Replace("HD", "").Replace("500B", "HD8A");
																		}
																	}
																}
															}
														}
													}
													else
													{
														if (text11.Equals("110216") && text3.IndexOf("LT290W") >= 0)
														{
															text10 = text10.Replace("LT290W", "LT280W").Replace("(LT290W", "LT280W");
															text3 = text3.Replace("LT290W", "LT280W");
														}
													}
													if (this.bStopCurAction)
													{
														this.WriteLog("您点击了停止操作，程序已停止导出", 1);
														streamWriter.Close();
														return;
													}
													Application.DoEvents();
													attrstr = text10;
													int int_ = (text9.IndexOf("skuMap") >= 0) ? 1 : 0;
													string[] array5 = this.method_64(text10, text11, int_, text3);
													Application.DoEvents();
													num3++;
													string text33 = array5[0];
													num3++;
													if (this.bStopCurAction)
													{
														this.WriteLog("您点击了停止操作，程序已停止导出", 1);
														streamWriter.Close();
														return;
													}
													Application.DoEvents();
													string text34 = "";
													string text35 = "";
													string text36 = "0";
													string text37 = "0";
													string text38 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
													string text39 = "200";
													string text40 = "";
													string text41 = "0";
													string text42 = text24;
													string text43 = "";
													string text44 = array5[2];
													string text45 = array5[1];
													string text46 = "";
													string text47 = "";
													string text48 = "";
													string text49 = "";
													string text50 = "福建";
													string text51 = "厦门";
													j = text9.LastIndexOf("所在地区：</span>");
													if (j > 0)
													{
														text10 = text9.Substring(j + 12);
														text10 = text10.Substring(0, text10.IndexOf("</i>"));
														text10 = text10.Substring(text10.LastIndexOf("<em") + 1);
														text10 = text10.Substring(text10.IndexOf(">") + 1);
														text10 = text10.Substring(0, text10.IndexOf("<")).Trim();
														text50 = this.method_52(text10);
														if (text50.Length < 1)
														{
															text50 = "福建";
															text51 = "厦门";
														}
														else
														{
															text51 = text10.Substring(text50.Length);
															if (text51.Length < 1)
															{
																text51 = text50;
															}
														}
													}
													else
													{
														if (text9.IndexOf("name=\"region\"") >= 0)
														{
															text10 = this.method_36(text9, "region");
															text50 = this.method_52(text10);
															if (text50.Length < 1)
															{
																text50 = "福建";
																text51 = "厦门";
															}
															else
															{
																text51 = text10.Substring(text50.Length);
																if (text51.Length < 1)
																{
																	text51 = text50;
																}
															}
														}
													}
													string text52 = "";
													Application.DoEvents();
													num3 = 3000;
													j = text9.IndexOf("skuMap");
													this.int_3 = 2;
													try
													{
														if (j > 0 && !this.ckNoSellProp.Checked && !this.bCatNoSellProp(text11))
														{
															text33 = this.method_87(text33, "1627207", text11);
															text33 = this.method_87(text33, "1627778", text11);
															text10 = text9.Substring(j);
															j = text10.IndexOf("});");
															if (j < 0)
															{
																j = text10.IndexOf("</script>");
															}
															if (j < 0)
															{
																j = text10.IndexOf("var");
															}
															text10 = text10.Substring(0, j);
															if (text10.IndexOf("</script>") > 0)
															{
																text10 = text10.Substring(0, text10.IndexOf("</script>"));
															}
															j = text10.IndexOf("\";");
															num3 = 3000001;
															int num19 = 0;
															int num20 = 0;
															string text53 = "";
															string text54 = "";
															int num21 = 0;
															while (j > 0 && num21 < this.iSellPropAlias)
															{
																num19++;
																num3 = 30000010;
																text10 = text10.Substring(j + 2);
																num3 = 30000011;
																string text55 = "";
																int num22 = text10.IndexOf("skuId");
																if (num22 > 0)
																{
																	text55 = text10.Substring(num22 + 7);
																	if (text55.Trim().StartsWith("\""))
																	{
																		text55 = text55.Substring(text55.IndexOf("\"") + 1);
																		text55 = text55.Substring(0, text55.IndexOf("\""));
																	}
																	else
																	{
																		text55 = text55.Substring(0, text55.IndexOf(","));
																	}
																}
																num3 = 30000012;
																string text56 = text10.Substring(0, text10.IndexOf("\""));
																j = text10.IndexOf(";");
																string text57 = text56.Substring(0, j);
																num3 = 30000013;
																string text58 = "";
																string text59 = "";
																text56 = text56.Substring(j + 1);
																if (text56.Length > 0)
																{
																	int num23 = text56.IndexOf(";");
																	text58 = text56.Substring(0, num23);
																	text56 = text56.Substring(num23 + 1);
																	if (text56.Length > 0)
																	{
																		text59 = text56.Substring(0, text56.LastIndexOf(";"));
																	}
																}
																if (text57.IndexOf("1627207:") >= 0)
																{
																	string text60 = text58;
																	text58 = text57;
																	text57 = text60;
																}
																num3 = 30000014;
																if (text58.IndexOf("1627778") >= 0)
																{
																	string text61 = text57;
																	text57 = text58;
																	text58 = text61;
																}
																text10 = text10.Substring(text10.IndexOf("price") + 7);
																text10 = text10.Substring(text10.IndexOf("\"") + 1);
																string text62 = text10.Substring(0, text10.IndexOf("\""));
																if (this.decimal_0 > 0m && !this.ckNoPromote.Checked)
																{
																	string sellPropPriceBySkuid = this.GetSellPropPriceBySkuid(text55);
																	if (sellPropPriceBySkuid.Length > 0)
																	{
																		text62 = sellPropPriceBySkuid;
																	}
																}
																if (num12 != 0)
																{
																	//goto IL_1EE7;
																}
																if (num13 != 1f)
																{
																	goto Block_170;
																}
																Block_171:
																try
																{
																	float num24 = float.Parse(text14);
																	float num25 = float.Parse(text62);
																	if (num25 > num24)
																	{
																		text14 = num25.ToString();
																	}
																	goto IL_268C;
																}
																catch (Exception)
																{
																	goto IL_268C;
																}
																goto IL_1F46;
																IL_1F76:
																string text63 = text63.Substring(0, text63.IndexOf("\""));
																if (text63.IndexOf("}") > 0)
																{
																	text63 = text63.Substring(0, text63.IndexOf("}"));
																}
																if (text53.IndexOf(text58) < 0)
																{
																	text53 = text53 + text58 + ";";
																	int num26 = text9.IndexOf("value=\"" + text58);
																	if (num26 >= 0)
																	{
																		string text64 = text9.Substring(num26);
																		text64 = text64.Substring(0, text64.IndexOf("</a>"));
																		if (this.ckSellImg.Checked && num20 < this.iSellPropAlias)
																		{
																			num26 = text64.IndexOf("background:url(");
																			if (num26 > 0)
																			{
																				try
																				{
																					string text65 = text64.Substring(num26 + 15);
																					text65 = text65.Substring(0, text65.IndexOf(")"));
																					if (text65.IndexOf("_30x30") > 0)
																					{
																						text65 = text65.Replace("_30x30", "_310x310").Replace("_310x310.jpg", "");
																						string text66 = Form1.GetMD5(text65, this.string_2).ToUpper();
																						string text67 = text23 + "\\" + text66 + ".tbi";
																						this.method_50(text65, text67, text5);
																						this.WriteLog(string.Concat(new string[]
																						{
																							"正在下载销售属性",
																							text58,
																							"图片:",
																							text65,
																							"到",
																							text67
																						}), 1);
																						if (this.ckLowVer.Checked)
																						{
																							string text31 = text52;
																							text52 = string.Concat(new string[]
																							{
																								text31,
																								text66,
																								":1:0:",
																								text58,
																								"|;"
																							});
																						}
																						else
																						{
																							string text31 = text52;
																							text52 = string.Concat(new string[]
																							{
																								text31,
																								text66,
																								":2:0:",
																								text58,
																								"|;"
																							});
																						}
																						num20++;
																						this.int_2++;
																					}
																				}
																				catch (Exception)
																				{
																				}
																			}
																		}
																		num3 = 3000002;
																		string text68 = "";
																		num26 = text64.IndexOf("title=");
																		if (num26 >= 0)
																		{
																			text64 = text64.Substring(num26 + 7);
																			text68 = text64.Substring(0, text64.IndexOf("\""));
																		}
																		else
																		{
																			num26 = text64.IndexOf("<span>");
																			if (num26 >= 0)
																			{
																				text64 = text64.Substring(num26 + 6);
																				text68 = text64.Substring(0, text64.IndexOf("</span>"));
																			}
																		}
																		if (text47.IndexOf(text58) < 0 && text58.Length > 1 && text68.Length > 0)
																		{
																			text68 = text68.Replace("[", "【").Replace("]", "】");
																			if (this.method_85(text11, text58, text68))
																			{
																				num21++;
																				string text31 = text47;
																				text47 = string.Concat(new string[]
																				{
																					text31,
																					text58,
																					":",
																					this.method_84(text68),
																					";"
																				});
																				int num27 = text58.IndexOf(":");
																				if (num27 >= 0)
																				{
																					string text69 = text58.Substring(0, num27);
																					text58.Substring(num27 + 1);
																					if (text44.IndexOf(text69) >= 0)
																					{
																						text44 = text44.Replace(text69, "").Replace(",,", ",");
																						text45 = text45.Replace(text68, "").Replace(",,", ",");
																					}
																				}
																			}
																		}
																		num3 = 3000003;
																	}
																}
																Application.DoEvents();
																if (text54.IndexOf(text57) < 0)
																{
																	num3 = 3000005;
																	text54 = text54 + text57 + ";";
																	int num28 = text9.IndexOf("value=\"" + text57);
																	if (num28 >= 0)
																	{
																		string text70 = text9.Substring(num28);
																		text70 = text70.Substring(text70.IndexOf("<span>") + 6);
																		string text71 = text70.Substring(0, text70.IndexOf("</span>"));
																		num3 = 3000006;
																		if (text47.IndexOf(text57) < 0 && text57.Length > 1)
																		{
																			num3 = 3000007;
																			text71 = text71.Replace("[", "【").Replace("]", "】");
																			if (this.method_85(text11, text57, text71))
																			{
																				num3 = 3000008;
																				string text31 = text47;
																				text47 = string.Concat(new string[]
																				{
																					text31,
																					text57,
																					":",
																					this.method_84(text71),
																					";"
																				});
																				int num29 = text57.IndexOf(":");
																				num3 = 3000009;
																				if (num29 >= 0)
																				{
																					string text72 = text57.Substring(0, num29);
																					text57.Substring(num29 + 1);
																					if (text44.IndexOf(text72) >= 0)
																					{
																						text44 = text44.Replace(text72, "").Replace(",,", ",");
																						text45 = text45.Replace(text71, "").Replace(",,", ",");
																					}
																				}
																			}
																		}
																	}
																}
																num3 = 3000004;
																Application.DoEvents();
																text63 = this.method_80(text63, text58, text57, dStockStr);
																string text73;
																if (text59.Length < 1)
																{
																	string text31 = text43;
																	text43 = string.Concat(new string[]
																	{
																		text31,
																		text73,
																		":",
																		text63,
																		"::",
																		(text58.Length > 0) ? (text58 + ";") : "",
																		(text57.Length > 0) ? (text57 + ";") : ""
																	});
																}
																else
																{
																	string text31 = text43;
																	text43 = string.Concat(new string[]
																	{
																		text31,
																		text73,
																		":",
																		text63,
																		"::",
																		(text57.Length > 0) ? (text57 + ";") : "",
																		(text59.Length > 0) ? (text59 + ";") : "",
																		(text58.Length > 0) ? (text58 + ";") : ""
																	});
																}
																num3 = 3000014;
																if (text33.IndexOf(text58) < 0)
																{
																	text33 = text33 + text58 + ";";
																}
																if (text33.IndexOf(text57) < 0 && text57.Length > 1)
																{
																	text33 = text33 + text57 + ";";
																}
																num3 = 3000024;
																j = text10.IndexOf("\";");
																continue;
																IL_1F46:
																text63 = text10.Substring(text10.IndexOf("\"") + 1);
																goto IL_1F76;
																IL_268C:
																text73 = this.method_61(text62);
																text10 = text10.Substring(text10.IndexOf("stock") + 6);
																text63 = "";
																if (text10.StartsWith(":\""))
																{
																	goto IL_1F46;
																}
																text63 = text10.Substring(text10.IndexOf(":") + 1);
																goto IL_1F76;
																Block_170:
																try
																{
																	IL_1EE7:
																	float num30 = float.Parse(text62);
																	if (num30 + (float)num12 > 0f)
																	{
																		num30 += (float)num12;
																	}
																	text62 = (num30 * num13).ToString();
																}
																catch (Exception)
																{
																}
																goto Block_171;
															}
															text47 = text47.TrimEnd(new char[]
															{
																';'
															}).Replace(" ", "");
															num3 = 3000005;
														}
													}
													catch (Exception ex)
													{
														this.WriteLog(num3 + ex.Message, 1);
													}
													num3 = 30000062;
													text47 = this.method_83(text47);
													num3 = 30000063;
													if (text43.Length > 0)
													{
														text33 = text33.Replace("20503:2147483647;", "").Replace("1627207:2147483647;", "");
													}
													string text74 = "0";
													string text75 = "1";
													num3 = 30000064;
													if (this.bFkfjNull(text11, text43, attrstr))
													{
														text75 = "";
													}
													num3 = 3000007;
													Application.DoEvents();
													text44 = text44.TrimEnd(new char[]
													{
														';'
													}).TrimEnd(new char[]
													{
														','
													});
													text45 = text45.TrimEnd(new char[]
													{
														';'
													}).TrimEnd(new char[]
													{
														','
													});
													if (text44.IndexOf(";") > 0)
													{
														text44 = text44.Replace(";", ",");
													}
													if (!text11.Equals("50011988") && !text11.Equals("50011998"))
													{
														if (text11.Equals("1512"))
														{
															text47 = "";
														}
													}
													else
													{
														text43 = "";
														text47 = "";
													}
													num3 = 3000008;
													text47 = this.DecodeHtmChar(text47).Replace("Φ", "");
													text3 = this.DecodeHtmChar(text3);
													text3 = this.method_39(text3);
													string tui = this.getTui(text11);
													string wireless = this.GetWireless(text20, text5, text23);
													if (this.ckLowVer.Checked)
													{
														string text31 = text8;
														text8 = string.Concat(new string[]
														{
															text31,
															"\"",
															text3.Replace("\"", "\"\""),
															"\"\t",
															text11,
															"\t\"\"\t",
															text12,
															"\t\"",
															text50,
															"\"\t\"",
															text51,
															"\"\t\"",
															text13,
															"\"\t",
															this.method_61(text14),
															"\t",
															this.method_61(string_),
															"\t",
															text15,
															"\t7\t",
															text17,
															"\t",
															this.method_61(string_2),
															"\t",
															this.method_61(winTitle),
															"\t",
															this.method_61(string_3),
															"\t",
															text74,
															"\t",
															text75,
															"\t0\t0\t0\t",
															text32,
															"\t0\t\"1980-01-01 00:00:00\"\t\t\"",
															text20,
															"\"\t",
															text26,
															"\t\"",
															text33,
															"\"\t",
															text34,
															"\t",
															text35,
															"\t",
															text36,
															"\t",
															text37,
															"\t\"",
															text38,
															"\"\t",
															text39,
															"\t",
															text40,
															"\t",
															text41,
															"\t\"",
															text42,
															text27,
															text52,
															"\"\t\"",
															text48,
															"\"\t\"",
															text43,
															"\"\t\"",
															text44,
															"\"\t\"",
															text45.Replace("\"", "\"\""),
															"\"\t\"",
															text46.Replace("\"", "\"\""),
															"\"\t\"",
															text47.Replace("\"", "\"\""),
															"\"\t0\t\"",
															text49.Replace("\"", "\"\""),
															"\"\t",
															this.string_3
														});
													}
													else
													{
														string text31 = text8;
														text8 = string.Concat(new string[]
														{
															text31,
															"\"",
															text3.Replace("\"", "\"\""),
															"\"\t",
															text11,
															"\t\"\"\t",
															text12,
															"\t\"",
															text50,
															"\"\t\"",
															text51,
															"\"\t\"",
															text13,
															"\"\t",
															this.method_61(text14),
															"\t\"",
															this.method_61(string_),
															"\"\t",
															text15,
															"\t7\t",
															text17,
															"\t",
															this.method_61(string_2),
															"\t",
															this.method_61(winTitle),
															"\t",
															this.method_61(string_3),
															"\t0\t0\t",
															text32,
															"\t1\t\"1980-01-01 00:00:00\"\t\"",
															text20,
															"\"\t\"",
															text33,
															"\"\t0\t0\t\"",
															text38,
															"\"\t\"200\"\t\"",
															this.GetPicStatus(),
															"\"\t0\t\"",
															text42,
															text27,
															text52,
															"\"\t\"",
															text48,
															"\"\t\"",
															text43,
															"\"\t\"",
															text44,
															"\"\t\"",
															text45.Replace("\"", "\"\""),
															"\"\t\"",
															text46.Replace("\"", "\"\""),
															"\"\t\"",
															text47.Replace("\"", "\"\""),
															"\"\t0\t0\t0\t1\t\"\"\t1\t204\t66\t",
															this.string_3,
															"\t\t1613074094\t0\t\t\t",
															tui,
															"\t\t\"",
															wireless,
															"\""
														});
													}
													streamWriter.WriteLine(text8);
													num++;
													if (text6.Length > 0)
													{
														try
														{
															DataBase dataBase2 = new DataBase("copied.mdb");
															OleDbCommand cmd2 = new OleDbCommand("insert into goods(url) values('" + text6 + "')");
															dataBase2.ExecuteCmdNonQuery(cmd2);
														}
														catch (Exception)
														{
														}
													}
													Application.DoEvents();
													break;
												}
												else
												{
													for (int l = 0; l < 100; l++)
													{
														Thread.Sleep(50);
														Application.DoEvents();
													}
													num11 = (num11 + 1) % 2;
												}
											}
											catch (Exception ex2)
											{
												this.WriteLog(string.Concat(new string[]
												{
													"处理商品[",
													text5,
													"]出错:",
													ex2.Message,
													"trace:",
													num3.ToString()
												}), 1);
												if (ex2.Message.IndexOf("超时") > 0 || ex2.Message.ToLower().IndexOf("timeout") > 0)
												{
													this.WriteLog("访问淘宝超时重新下载该商品", 1);
													num6--;
													if (num6 <= 0)
													{
														num5--;
													}
												}
												if (this.bStopCurAction)
												{
													this.WriteLog("您点了中止下载，已为你保存之前导出的数据。下次导出若不想包含本次导出的商品请勾上选项10", 1);
													streamWriter.Close();
												}
												break;
											}
										}
									}
									else
									{
										this.WriteLog("商品地址[" + array2[num5] + "]格式不正确", 1);
									}
									IL_2F69:
									num5++;
									continue;
								}
								this.WriteLog("处理已停止，因为您点击了停止按钮", 1);
								streamWriter.Close();
								return;
							}
							else
							{
								this.ShowNoRegMessage();
							}
							return;
						}
						streamWriter.Close();
						this.WriteLog(num + "导出商品成功...", 1);
					}
					return;
				}
			}
			//goto IL_2A7;
		}
		public string getTui(string catid)
		{
			if (!catid.Equals("50014912") && !catid.Equals("50014897"))
			{
				return "1";
			}
			return "0";
		}
		public string GetWirelessTxt(string txt)
		{
			if (this.wirelesstxtlen >= 5000)
			{
				return "";
			}
			if (txt.Length < 500)
			{
				if (this.wirelesstxtlen + txt.Length > 5000)
				{
					int length = 5000 - this.wirelesstxtlen;
					this.wirelesstxtlen += txt.Length;
					return "<txt>" + txt.Substring(0, length) + "</txt>";
				}
				this.wirelesstxtlen += txt.Length;
				return "<txt>" + txt + "</txt>";
			}
			else
			{
				string text = txt.Substring(0, 500);
				string txt2 = txt.Substring(500);
				if (this.wirelesstxtlen + text.Length > 5000)
				{
					int length2 = 5000 - this.wirelesstxtlen;
					this.wirelesstxtlen += text.Length;
					return "<txt>" + text.Substring(0, length2) + "</txt>";
				}
				this.wirelesstxtlen += text.Length;
				return "<txt>" + text + "</txt>" + this.GetWirelessTxt(txt2);
			}
		}
		public string GetWireless(string des, string gurl, string picpath)
		{
			this.wirelesstxtlen = 0;
			if (!this.ckWireless.Checked)
			{
				return "";
			}
			des = des.Replace("\"\"", "\"");
			int i = des.IndexOf("<");
			if (i < 0)
			{
				return "<wapDesc>" + this.GetWirelessTxt(des.Trim()) + "</wapDesc>";
			}
			string text = "<wapDesc>";
			string text2 = "";
			int num = 0;
			int num2 = 0;
			while (i >= 0)
			{
				text2 += des.Substring(0, i).Trim();
				des = des.Substring(i + 1);
				int num3 = des.IndexOf(">");
				if (num3 < 0)
				{
					if (text2.Length > 0)
					{
						text = text + "<txt>" + this.GetWirelessTxt(text2) + "</txt>";
					}
					text2 = "";
					break;
				}
				string text3 = des.Substring(0, num3).Trim();
				des = des.Substring(num3 + 1);
				int num4 = text3.ToLower().IndexOf("src=");
				if (num4 >= 0)
				{
					text3 = text3.Substring(num4 + 4).TrimStart(new char[]
					{
						'"'
					});
					if (text3.IndexOf("\"") >= 0)
					{
						text3 = text3.Substring(0, text3.IndexOf("\""));
					}
					else
					{
						if (text3.IndexOf(" ") >= 0)
						{
							text3 = text3.Substring(0, text3.IndexOf(" "));
						}
					}
					text3 = text3.Trim().Trim(new char[]
					{
						'"'
					}).Trim();
					if (num2 < 1500 && num <= 30)
					{
						try
						{
							string text4 = this.method_82(text3, gurl, picpath);
							if (text4.Length > 1)
							{
								FileInfo fileInfo = new FileInfo(text4);
								num2 += (int)(fileInfo.Length / 1024L);
								num++;
								if (num2 < 1500 && num <= 30)
								{
									text = text + "<img>" + text4 + "</img>";
								}
							}
						}
						catch (Exception)
						{
						}
					}
				}
				i = des.IndexOf("<");
			}
			text2 += des.Substring(0).Trim();
			if (text2.Length > 0)
			{
				text = text + "<txt>" + this.GetWirelessTxt(text2) + "</txt>";
			}
			text += "</wapDesc>";
			return text;
		}
		private string method_82(string string_12, string string_13, string string_14)
		{
			try
			{
				Directory.CreateDirectory(string_14 + "\\wireless");
			}
			catch (Exception)
			{
			}
			string str = ".jpg";
			if (string_12.ToLower().IndexOf(".gif") >= 0)
			{
				str = ".gif";
			}
			string text = string_14 + "\\wireless\\" + Form1.GetMD5(string_12, DateTime.Now.Ticks.ToString()) + str;
			Bitmap bitmap;
			if (string_12.ToLower().StartsWith("file:///"))
			{
				string_12 = string_12.Substring(8).Replace("/", "\\");
				bitmap = (Bitmap)Image.FromFile(string_12);
			}
			else
			{
				if (string_12.IndexOf("/http://") < 0 && string_12.ToLower().IndexOf("cdn.com/") >= 0)
				{
					string_12 = "http://img.taobaocdn.com/bao/uploaded/" + string_12;
				}
				new CookieContainer();
				HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_12);
				httpWebRequest.CookieContainer = this.cookie;
				httpWebRequest.Timeout = 20000;
				httpWebRequest.ReadWriteTimeout = 45000;
				httpWebRequest.Referer = string_13 + "&rn=" + DateTime.Now.Ticks.ToString();
				httpWebRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" + DateTime.Now.Ticks.ToString();
				httpWebRequest.KeepAlive = true;
				HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
				if (httpWebResponse.ContentType.ToString().ToLower().IndexOf("gif") >= 0)
				{
					text = text.Replace(".jpg", ".gif");
				}
				bitmap = new Bitmap(httpWebResponse.GetResponseStream());
				httpWebResponse.Close();
			}
			if (bitmap.Width < 480)
			{
				return "";
			}
			int num = bitmap.Width;
			int num2 = bitmap.Height;
			int num3 = 620;
			int num4 = 600;
			string result;
			try
			{
				try
				{
					int num5 = num2;
					int num6 = num;
					if (num6 > num3)
					{
						num6 = num3;
						num5 = num2 * num3 / num;
						num2 = num5;
						num = num6;
					}
					if (num5 > num4)
					{
						num5 = num4;
						num6 = num * num4 / num2;
						num2 = num5;
						num = num6;
					}
					if (num6 < 480)
					{
						num6 = 480;
						num5 = num2 * 480 / num;
					}
					if (num6 < 480)
					{
						num6 = 480;
					}
					if (num6 > 620)
					{
						num6 = 620;
					}
					if (num5 > 960)
					{
						num5 = 960;
					}
					Bitmap bitmap2 = new Bitmap(num6, num5);
					Graphics graphics = Graphics.FromImage(bitmap2);
					graphics.InterpolationMode = InterpolationMode.Low;
					graphics.SmoothingMode = SmoothingMode.HighSpeed;
					graphics.DrawImage(bitmap, new Rectangle(0, 0, num6, num5), new Rectangle(0, 0, bitmap.Width, bitmap.Height), GraphicsUnit.Pixel);
					bitmap2.Save(text);
					bitmap2.Dispose();
					bitmap.Dispose();
					graphics.Dispose();
					result = text;
				}
				catch (Exception)
				{
					result = "";
				}
			}
			catch (Exception)
			{
				result = "";
			}
			return result;
		}
		public string GetSellPropPriceBySkuid(string skuid)
		{
			string result = "";
			try
			{
				if (skuid.Length < 1)
				{
					return result;
				}
				string text = this.string_1;
				int num = text.IndexOf("priceInfo");
				if (num > 0)
				{
					text = text.Substring(num);
				}
				int num2 = text.IndexOf(skuid);
				if (num2 > 0)
				{
					text = text.Substring(num2);
					text = text.Substring(0, text.IndexOf("},\""));
				}
				decimal num3 = 0m;
				for (int i = text.IndexOf("\"price\":\""); i > 0; i = text.IndexOf("\"price\":\""))
				{
					text = text.Substring(i + 9);
					string s = text.Substring(0, text.IndexOf("\""));
					try
					{
						decimal num4 = decimal.Parse(s);
						if (num4 < num3 || num3 == 0m)
						{
							num3 = num4;
						}
					}
					catch (Exception)
					{
					}
				}
				if (num3 > 0m)
				{
					result = num3.ToString();
				}
			}
			catch (Exception)
			{
			}
			return result;
		}
		public string GetPicStatus()
		{
			string text = "";
			for (int i = 0; i < this.int_2; i++)
			{
				text += "1;";
			}
			return text;
		}
		public bool bCatNoSellProp(string catid)
		{
			return catid.Equals("50011980") || catid.Equals("50011978") || catid.Equals("50011990") || catid.Equals("50011983") || catid.Equals("50011982") || catid.Equals("50011977") || catid.Equals("50011979") || catid.Equals("50011981") || catid.Equals("50011986");
		}
		private string method_83(string string_12)
		{
			string_12 = string_12.Replace("(每款具体尺寸略有差异", "").Replace("(请对比具体尺寸再选购", "");
			if (this.iSellPropAlias == 0)
			{
				return string_12;
			}
			string[] array = string_12.Split(new char[]
			{
				';'
			});
			string text = "";
			int num = 0;
			while (num < this.iSellPropAlias && num < array.Length && num < 21)
			{
				text = text + array[num] + ";";
				num++;
			}
			return text;
		}
		private string method_84(string string_12)
		{
			string_12 = string_12.Replace("\"", "").Replace("&ldquo;", "").Replace("&rdquo;", "").Replace("&", "").Replace(";", "").Replace("＞", "");
			if (string_12.Length > 15)
			{
				return string_12.Substring(0, 15);
			}
			return string_12;
		}
		private void btnExportSingle_Click(object sender, EventArgs e)
		{
			this.method_81();
		}
		private bool method_85(string string_12, string string_13, string string_14)
		{
			bool result = true;
			DataBase dataBase = new DataBase();
			OleDbCommand cmd = new OleDbCommand(string.Concat(new string[]
			{
				"select * from ppoption where cid='",
				string_12,
				"' and pid&':'&vid='",
				string_13,
				"' and vname like '%|",
				string_14,
				"|%'"
			}));
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(cmd);
			if (oleDbDataReader.Read())
			{
				result = false;
			}
			oleDbDataReader.Close();
			dataBase.Close();
			return result;
		}
		private string method_86(string string_12, string string_13, string string_14)
		{
			int num = 9000;
			string result;
			try
			{
				string text = "";
				int i = string_13.IndexOf("http://");
				while (i >= 0)
				{
					num = 9001;
					text += string_13.Substring(0, i);
					num = 9002;
					string_13 = string_13.Substring(i);
					num = 9003;
					int num2 = string_13.IndexOf("\"");
					string text2 = "";
					if (num2 > 0)
					{
						text2 = string_13.Substring(0, num2);
					}
					else
					{
						num2 = string_13.IndexOf("<");
						if (num2 > 0)
						{
							text2 = string_13.Substring(0, num2);
						}
						else
						{
							text2 = string_13.Substring(0);
						}
					}
					num = 9004;
					string text3 = text2.ToLower();
					int num3 = 0;
					while (true)
					{
						if (num3 == 1)
						{
							goto IL_2EF;
						}
						IL_A8:
						if (text3.IndexOf(".tudun007.com") > 0 && text3.Length > 300)
						{
							goto IL_327;
						}
						if ((text3.IndexOf("t.cn/") <= 0 && text3.IndexOf("photo.store.qq.com") <= 0 && text3.IndexOf(".tudun007.com") <= 0 && text3.IndexOf(".taobaocdn.com") <= 0 && text3.IndexOf(".jpeg") <= 0 && text3.IndexOf(".jpeg") <= 0 && text3.IndexOf(".jpg") <= 0 && text3.IndexOf(".gif") <= 0 && text3.IndexOf(".png") <= 0) || (!this.ckOnlyPic.Checked && !this.ckMoveAll.Checked && (!this.ckMovePic.Checked || (text3.IndexOf("zerowork.cn") <= 0 && text3.IndexOf("taobaocdn.com") <= 0 && text3.IndexOf("alicdn.com") <= 0))))
						{
							goto IL_332;
						}
						int num4 = text2.IndexOf("<");
						if (num4 > 0)
						{
							text2 = text2.Substring(0, num4);
						}
						string text4 = text2.Substring(text2.LastIndexOf("."));
						int num5 = text4.IndexOf("?");
						if (num5 > 0)
						{
							text4 = text4.Substring(0, num5);
						}
						if (text4.ToLower().StartsWith(".com") || text4.ToLower().StartsWith(".cn"))
						{
							text4 = ".jpg";
						}
						if (text4.Length > 4)
						{
							text4 = ".jpg";
						}
						string string_15 = string_12 + "\\" + Form1.GetMD5(text2, DateTime.Now.Ticks.ToString()) + text4;
						try
						{
							this.WriteLog("正在下载图片:" + text2, 1);
							this.int_9 = 0;
							string text5 = this.method_50(text2, string_15, string_14);
							this.WriteLog("该图片下载完成", 1);
							if (text5.Length > 1)
							{
								text = text + "file:///" + text5.Replace("\\", "/");
							}
							else
							{
								if (this.int_9 == 88)
								{
									num3 = 1;
									continue;
								}
								text += "";
							}
							break;
						}
						catch (Exception)
						{
							this.WriteLog(text2, 1);
							break;
						}
						IL_2EF:
						if (text3.IndexOf("pic.yupoo.com") >= 0)
						{
							goto IL_31C;
						}
						if (text3.IndexOf(".myzcm.net") >= 0)
						{
							goto Block_26;
						}
						goto IL_A8;
					}
					IL_33B:
					string_13 = string_13.Substring(text2.Length);
					i = string_13.IndexOf("http://");
					continue;
					IL_31C:
					text += text2;
					goto IL_33B;
					Block_26:
					goto IL_31C;
					IL_327:
					text += text2;
					goto IL_33B;
					IL_332:
					text += text2;
					goto IL_33B;
				}
				text += string_13;
				result = text;
			}
			catch (Exception ex)
			{
				this.WriteLog(num.ToString() + "DoMovePic" + ex.Message, 1);
				result = string_13;
			}
			return result;
		}
		private string method_87(string string_12, string string_13, string string_14)
		{
			if (string_13.Equals("1627207") && string_14.Equals("50003494"))
			{
				return string_12;
			}
			for (int i = string_12.IndexOf(string_13); i >= 0; i = string_12.IndexOf(string_13))
			{
				string str = string_12.Substring(0, i);
				string text = string_12.Substring(i);
				string_12 = str + text.Substring(text.IndexOf(";") + 1);
			}
			return string_12;
		}
		private void ckMovePic_Click(object sender, EventArgs e)
		{
			if (this.ckMovePic.Checked)
			{
				StreamWriter streamWriter = File.CreateText(Application.StartupPath + "\\MovePic.ini");
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\MovePic.ini"))
			{
				File.Delete(Application.StartupPath + "\\MovePic.ini");
			}
		}
		private void ckMoveAll_Click(object sender, EventArgs e)
		{
			if (this.ckMoveAll.Checked)
			{
				StreamWriter streamWriter = File.CreateText(Application.StartupPath + "\\MoveAll.ini");
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\MoveAll.ini"))
			{
				File.Delete(Application.StartupPath + "\\MoveAll.ini");
			}
		}
		private void method_88(object sender, EventArgs e)
		{
			DataGrid dataGrid = (DataGrid)((TextBox)sender).Parent;
			string fileName = dataGrid[dataGrid.CurrentCell.RowNumber, 1].ToString();
			Process.Start(fileName);
		}
		private void btnSearchCat_Click(object sender, EventArgs e)
		{
			if (this.txtCat.Text.Trim().EndsWith(".com") || this.txtCat.Text.Trim().EndsWith(".COM"))
			{
				int num = this.txtCat.Text.ToLower().LastIndexOf(".com");
				this.txtCat.Text = this.txtCat.Text.Substring(0, num + 4) + "/?search=y";
			}
			Thread thread = new Thread(new ThreadStart(this.method_90));
			thread.Start();
		}
		public string UrlEncodeGB(string str)
		{
			StringBuilder stringBuilder = new StringBuilder();
			byte[] bytes = Encoding.GetEncoding("gb2312").GetBytes(str);
			int i = 0;
			while (i < bytes.Length)
			{
				if (bytes[i] == 37 || bytes[i] == 61 || bytes[i] == 35 || bytes[i] == 38 || bytes[i] == 63 || bytes[i] == 58 || bytes[i] == 47 || bytes[i] == 95 || (bytes[i] >= 97 && bytes[i] <= 122) || (bytes[i] >= 48 && bytes[i] <= 57) || (bytes[i] >= 65 && bytes[i] <= 90) || bytes[i] == 46 || bytes[i] == 45)
				{
					goto IL_C2;
				}
				if (bytes[i] == 126)
				{
					goto IL_C2;
				}
				stringBuilder.Append("%" + Convert.ToString(bytes[i], 16).ToUpper());
				IL_CC:
				i++;
				continue;
				IL_C2:
				stringBuilder.Append((char)bytes[i]);
				goto IL_CC;
			}
			return stringBuilder.ToString();
		}
		private int method_89(int int_10, int int_11, string string_12)
		{
			object value = Missing.Value;
			this.axWebBrowser_0.Navigate("about:_blank", ref value, ref value, ref value, ref value);
			for (int i = 0; i < 400; i++)
			{
				this.ThreadSleep();
			}
			int result;
			try
			{
				this.axWebBrowser_0.Navigate(string_12, ref value, ref value, ref value, ref value);
				goto IL_6D;
			}
			catch (Exception ex)
			{
				this.WriteLog(string_12 + "打开页面出错:" + ex.Message, 1);
				result = int_10;
			}
			return result;
			IL_6D:
			int num = 3;
			string text;
			while (true)
			{
				text = "";
				while (true)
				{
					this.ThreadSleep();
					if (this.bStopCurAction)
					{
						goto Block_3;
					}
					try
					{
						for (int j = 0; j < 300; j++)
						{
							this.ThreadSleep();
						}
						IHTMLDocument2 iHTMLDocument = (IHTMLDocument2)this.axWebBrowser_0.Document;
						IHTMLBodyElement iHTMLBodyElement = (IHTMLBodyElement)iHTMLDocument.body;
						IHTMLTxtRange iHTMLTxtRange = iHTMLBodyElement.createTextRange();
						string innerHTML = iHTMLDocument.body.innerHTML;
						if (innerHTML.IndexOf("为保障安全，请确认密码") > 0)
						{
							this.WriteLog("淘宝提示：为保障安全，请确认密码，请在网页里输入密码并点确认", 1);
							this.tabCtl.SelectedTab = this.tabWeb;
							try
							{
								while (true)
								{
									IL_F5:
									iHTMLDocument = (IHTMLDocument2)this.axWebBrowser_0.Document;
									innerHTML = iHTMLDocument.body.innerHTML;
									if (innerHTML.IndexOf("为保障安全，请确认密码") <= 0)
									{
										break;
									}
									for (int k = 0; k < 500; k++)
									{
										this.ThreadSleep();
									}
								}
								break;
							}
							catch (Exception)
							{
								for (int l = 0; l < 500; l++)
								{
									this.ThreadSleep();
								}
								//goto IL_F5;
							}
						}
						if (innerHTML.IndexOf("请输入您在下图中看到的内容") > 0)
						{
							this.WriteLog("淘宝提示：请输入您在下图中看到的内容，请在网页里输入验证码并点确认", 1);
							this.tabCtl.SelectedTab = this.tabWeb;
							try
							{
								while (true)
								{
									IL_191:
									iHTMLDocument = (IHTMLDocument2)this.axWebBrowser_0.Document;
									innerHTML = iHTMLDocument.body.innerHTML;
									if (innerHTML.IndexOf("请输入您在下图中看到的内容") <= 0)
									{
										break;
									}
									for (int m = 0; m < 500; m++)
									{
										this.ThreadSleep();
									}
								}
								break;
							}
							catch (Exception)
							{
								for (int n = 0; n < 500; n++)
								{
									this.ThreadSleep();
								}
								//goto IL_191;
							}
						}
						if (!iHTMLTxtRange.findText("所有宝贝", 1, 0) && !iHTMLTxtRange.findText("用手机逛本店", 1, 0) && !iHTMLTxtRange.findText("收藏店铺", 1, 0) && !iHTMLTxtRange.findText("个符合条件的商品", 1, 0) && !iHTMLTxtRange.findText("阿里巴巴", 1, 0) && !iHTMLTxtRange.findText("搜索", 1, 0))
						{
							text = iHTMLDocument.body.innerHTML;
							if (text.IndexOf("所有宝贝") > 0 || text.IndexOf("收藏店铺") > 0 || text.IndexOf("个符合条件的商品") > 0 || text.IndexOf("阿里巴巴") > 0 || text.IndexOf("搜索") > 0)
							{
								text = iHTMLDocument.body.innerHTML;
								goto IL_35C;
							}
						}
						else
						{
							text = iHTMLDocument.body.innerHTML;
							if (num > 0 && text.IndexOf("很抱歉，搜索到“<em>0</em>”个宝贝") > 0)
							{
								this.axWebBrowser_0.Refresh();
								for (int num2 = 0; num2 < 400; num2++)
								{
									this.ThreadSleep();
								}
								num--;
								break;
							}
							goto IL_35C;
						}
					}
					catch (Exception)
					{
						this.ThreadSleep();
					}
				}
			}
			Block_3:
			this.WriteLog("成功停止当前操作", 1);
			return int_10;
			IL_35C:
			StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\fcgw.txt", false);
			streamWriter.WriteLine(string_12);
			streamWriter.WriteLine(text);
			streamWriter.Close();
			string text2 = "";
			int num3 = text.IndexOf(">下一页<");
			if (num3 > 0)
			{
				string text3 = text.Substring(0, num3);
				text3 = text3.Substring(text3.LastIndexOf("<"));
				num3 = text3.IndexOf("http://");
				if (num3 > 0)
				{
					text3 = text3.Substring(num3);
					text2 = text3.Substring(0, text3.IndexOf("\"")).Replace("&amp;", "&");
				}
			}
			num3 = text.IndexOf("class=item-name");
			if (num3 < 0)
			{
				num3 = text.IndexOf("class=\"item-name");
			}
			new DataBase();
			new OleDbCommand();
			while (num3 > 0)
			{
				text = text.Substring(num3);
				text = text.Substring(text.IndexOf("http://"));
				string text4 = text.Substring(0, text.IndexOf("\""));
				text4 = text4.TrimEnd(new char[]
				{
					'&'
				});
				text = text.Substring(text.IndexOf(">") + 1);
				text.Substring(0, text.IndexOf("<")).Trim().Replace("'", "''").Replace("\"", "").Replace("&lt;", "<").Replace("&gt;", ">");
				int num4 = text4.IndexOf("&rn=");
				if (num4 > 0)
				{
					string text5 = text4.Substring(0, num4);
					text4 = text4.Substring(num4 + 1);
					num4 = text4.IndexOf("&");
					if (num4 > 0)
					{
						text5 += text4.Substring(num4);
					}
					text4 = text5;
				}
				int_10++;
				this.WriteLog(string.Concat(new object[]
				{
					"第",
					int_11.ToString(),
					"页找到第",
					int_10,
					"个商品",
					text4
				}), 1);
				this.txtGoods.Text = text4 + "\r\n" + this.txtGoods.Text;
				num3 = text.IndexOf("class=item-name");
				if (num3 < 0)
				{
					num3 = text.IndexOf("class=\"item-name");
				}
			}
			if (text2.Length > 0)
			{
				int_10 = this.method_89(int_10, int_11 + 1, text2);
			}
			return int_10;
		}
		private void method_90()
		{
			this.bStopCurAction = false;
			this.bool_3 = false;
			int num = 0;
			string text = this.txtCat.Text.Trim();
			string text2 = "";
			if (text.Length < 2)
			{
				MessageBox.Show("请输入要提取商品地址的自定义分类地址");
				return;
			}
			int num2 = 1;
			int num3 = 20;
			while (true)
			{
				try
				{
					Thread.Sleep(0);
					Application.DoEvents();
					if (this.bStopCurAction)
					{
						this.WriteLog("已停止读取商品列表", 1);
						return;
					}
					if (num2 > 2 && !this.VerifyRegCode())
					{
						MessageBox.Show("未注册版只能提示前2页");
						return;
					}
					if (!text.StartsWith("http"))
					{
						text = "http://search.taobao.com" + text;
					}
					text2 = this.method_14(text).Replace("'", "\"");
					goto IL_5B3;
				}
				catch (Exception)
				{
					this.WriteLog("打开地址" + text + "出错", 1);
					return;
				}
				IL_D4:
				if (text.IndexOf("/search.htm") > 0 && num3 > 0)
				{
					num3--;
					continue;
				}
				IL_F2:
				num3 = 20;
				string text3 = text;
				text2 = Form1.htmlToLower(text2);
				StreamWriter streamWriter = new StreamWriter("3.txt", false);
				streamWriter.WriteLine(text);
				streamWriter.WriteLine(text2);
				streamWriter.Close();
				int i = text2.IndexOf("<span>下一页</span>");
				if (i < 1)
				{
					i = text2.IndexOf("title=\"下一页");
				}
				if (i < 1)
				{
					i = text2.IndexOf("下一页</a>");
				}
				if (i < 1)
				{
					i = text2.LastIndexOf("class=\"page-next");
				}
				if (i < 0 || this.ckLogin.Checked)
				{
					goto IL_5D6;
				}
				text2 = text2.Substring(i + 10);
				string text4 = text2;
				i = text2.IndexOf("<span>下一页</span>");
				if (i < 1)
				{
					i = text2.IndexOf("下一页</a>");
				}
				if (i < 1)
				{
					i = text2.LastIndexOf("title=\"下一页");
				}
				if (i < 1)
				{
					i = text2.LastIndexOf("下一页");
				}
				if (i < 0)
				{
					break;
				}
				text2 = text2.Substring(0, i + 20);
				text2 = text2.Replace("href=\"//", "href=\"http://");
				int num4 = 1;
				i = text2.IndexOf("class=\"summary\"><a trace=\"auction\" traceNum=");
				if (i < 0)
				{
					num4 = 5;
					i = text2.IndexOf("class=\"summary\">");
				}
				if (i < 0)
				{
					num4 = 4;
					i = text2.IndexOf("class=\"product\" data-id=");
				}
				if (i < 0)
				{
					num4 = 3;
					i = text2.IndexOf("<dl");
				}
				if (i < 0)
				{
					num4 = 2;
					i = text2.IndexOf("<li");
				}
				while (i > 0)
				{
					text2 = text2.Substring(i);
					string text5 = text2.Substring(0, text2.IndexOf("</a>"));
					int num5 = text5.IndexOf("http://item.");
					if (num5 < 0)
					{
						num5 = text5.IndexOf("http://detail.");
					}
					if (num5 < 0)
					{
						num5 = text5.IndexOf("http://");
					}
					if (num5 < 0)
					{
						i = -1;
					}
					else
					{
						text2 = text2.Substring(num5);
						string text6 = text2.Substring(0, text2.IndexOf("\"")).Trim(new char[]
						{
							'&'
						});
						int num6 = text6.IndexOf("&rn=");
						if (num6 > 0)
						{
							string text7 = text6.Substring(0, num6);
							text6 = text6.Substring(num6 + 1);
							num6 = text6.IndexOf("&");
							if (num6 > 0)
							{
								text7 += text6.Substring(num6);
							}
							text6 = text7.Replace("&amp;", "&");
						}
						if (text6.Trim().Length < 1)
						{
							i = text2.IndexOf("<li");
						}
						else
						{
							num++;
							this.WriteLog(string.Concat(new object[]
							{
								"第",
								num2.ToString(),
								"页找到第",
								num,
								"个商品",
								text6
							}), 1);
							this.txtGoods.Text = text6 + "\r\n" + this.txtGoods.Text;
							i = -1;
							if (num4 == 1)
							{
								i = text2.IndexOf("class=\"summary\"><a trace=\"auction\" traceNum=");
							}
							else
							{
								if (num4 == 5)
								{
									i = text2.IndexOf("class=\"summary\">");
								}
								else
								{
									if (num4 == 2)
									{
										i = text2.IndexOf("<li");
									}
									else
									{
										if (num4 == 3)
										{
											i = text2.IndexOf("<dl");
										}
										else
										{
											if (num4 == 4)
											{
												i = text2.IndexOf("class=\"product\" data-id=");
											}
										}
									}
								}
							}
						}
					}
				}
				num2++;
				if (this.ck1page.Checked || text2.IndexOf("class=\"page-end") >= 0 || text2.IndexOf("class=\"disable\">下一页") >= 0)
				{
					break;
				}
				text2 = text2.Substring(text2.LastIndexOf("<a"));
				if (text2.LastIndexOf("href=") <= 0)
				{
					break;
				}
				text = text2.Substring(text2.LastIndexOf("href=") + 6);
				text = text.Substring(0, text.IndexOf("\"")).Replace("&amp;", "&");
				Thread.Sleep(0);
				Application.DoEvents();
				if (this.bStopCurAction)
				{
					goto IL_5C9;
				}
				if (text.IndexOf("javascript") >= 0)
				{
					int num7 = text4.IndexOf("title=\"下一页\">&gt;");
					if (num7 > 0)
					{
						text4 = text4.Substring(0, num7);
						text4 = text4.Substring(text4.LastIndexOf("href=") + 6);
						text = text4.Substring(0, text4.IndexOf("\""));
						if (text.StartsWith("?"))
						{
							text = text3.Substring(0, text3.LastIndexOf("?")) + text;
						}
					}
				}
				text = text.Replace("&amp;", "&");
				this.WriteLog(text, 1);
				if (text.Length <= 15)
				{
					break;
				}
				if (text.IndexOf("#") <= 0)
				{
					break;
				}
				continue;
				IL_5B3:
				if (text2.IndexOf("个符合条件的商品") < 0)
				{
					goto IL_D4;
				}
				goto IL_F2;
			}
			goto IL_5F1;
			IL_5C9:
			this.WriteLog("已停止读取商品列表", 1);
			return;
			IL_5D6:
			if (text2.IndexOf("很抱歉，搜索到") > 0 || this.ckLogin.Checked)
			{
				this.WriteLog("该地址从协议版读取不到宝贝，正在尝试从网页版读取", 1);
				if (this.ckLogin.Checked)
				{
					this.method_30();
				}
				int num8 = this.method_89(0, 1, this.txtCat.Text.Trim());
				if (num8 > 0)
				{
					this.WriteLog("商品地址提取完成，共有商品数量：" + num8, 1);
					return;
				}
				this.WriteLog("该自定义分类地址无商品1", 1);
				return;
			}
			IL_5F1:
			this.WriteLog("商品地址查找成功,总共找到商品数量:" + num.ToString(), 1);
		}
		private void ckMultiPic_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.ckMultiPic.Checked)
				{
					StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\MultiPic.ini", false);
					streamWriter.Close();
				}
				else
				{
					File.Delete(Application.StartupPath + "\\MultiPic.ini");
				}
			}
			catch (Exception)
			{
			}
		}
		private void ckNoSellProp_Click(object sender, EventArgs e)
		{
			if (this.ckNoSellProp.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\NoSellProp.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\NoSellProp.ini"))
			{
				File.Delete(Application.StartupPath + "\\NoSellProp.ini");
			}
		}
		private void ckStock_CheckedChanged(object sender, EventArgs e)
		{
		}
		private void ckSellImg_Click(object sender, EventArgs e)
		{
			if (this.ckSellImg.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\SellImg.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\SellImg.ini"))
			{
				File.Delete(Application.StartupPath + "\\SellImg.ini");
			}
		}
		private void ckDelHref_Click(object sender, EventArgs e)
		{
			if (this.ckDelHref.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\DelHref.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\DelHref.ini"))
			{
				File.Delete(Application.StartupPath + "\\DelHref.ini");
			}
		}
		private void ckDelOnlyHref_Click(object sender, EventArgs e)
		{
			if (this.ckDelOnlyHref.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\DelOnlyHref.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\DelOnlyHref.ini"))
			{
				File.Delete(Application.StartupPath + "\\DelOnlyHref.ini");
			}
		}
		private void ckDelHref_CheckedChanged(object sender, EventArgs e)
		{
		}
		private void ckDelOnlyHref_CheckedChanged(object sender, EventArgs e)
		{
		}
		private void ckPP_Click(object sender, EventArgs e)
		{
			if (this.ckPP.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\PPCSV.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\PPCSV.ini"))
			{
				File.Delete(Application.StartupPath + "\\PPCSV.ini");
			}
		}
		private void btnClearCopied_Click(object sender, EventArgs e)
		{
			this.tabCtl.SelectedTab = this.tabLog;
			this.WriteLog("开始清空“已复制过的商品地址列表”", 1);
			DataBase dataBase = new DataBase("copied.mdb");
			OleDbCommand cmd = new OleDbCommand("delete from goods");
			dataBase.ExecuteCmdNonQuery(cmd);
			this.WriteLog("清空“已复制过的商品地址列表”成功", 1);
			this.tabCtl.SelectedTab = this.tabSet;
		}
		private void ckNoCopied_Click(object sender, EventArgs e)
		{
			if (this.ckNoCopied.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\NoCopied.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\NoCopied.ini"))
			{
				File.Delete(Application.StartupPath + "\\NoCopied.ini");
			}
		}
		private void ckCompImg_Click(object sender, EventArgs e)
		{
			if (!this.ckCompImg.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\NoCompImg.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\NoCompImg.ini"))
			{
				File.Delete(Application.StartupPath + "\\NoCompImg.ini");
			}
		}
		private void menuItem_20_Click(object sender, EventArgs e)
		{
			Thread thread = new Thread(new ThreadStart(this.method_91));
			thread.Start();
		}
		private void method_91()
		{
			DataBase dataBase = new DataBase();
			OleDbCommand cmd = new OleDbCommand("select cid,[name] from ppcat order by cid");
			dataBase.Open();
			OleDbDataReader oleDbDataReader = dataBase.ExecuteCmd4Reader(cmd);
			while (oleDbDataReader.Read())
			{
				string @string = oleDbDataReader.GetString(0);
				string string2 = oleDbDataReader.GetString(1);
				HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("http://dev.open.taobao.com/api_tool/props/ajaxProps.php?cid=" + @string + "&action=props&restBool=false");
				HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse();
				Stream responseStream = httpWebResponse.GetResponseStream();
				StreamReader streamReader = new StreamReader(responseStream, Encoding.UTF8);
				string text = streamReader.ReadToEnd();
				streamReader.Close();
				httpWebResponse.Close();
				if (text.IndexOf("Fatal error") >= 0)
				{
					StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\ecid.txt", true, Encoding.UTF8);
					streamWriter.WriteLine(@string + "|" + string2);
					streamWriter.Close();
					this.WriteLog(string.Concat(new string[]
					{
						"开始处理类目[",
						@string,
						"|",
						string2,
						"]读取出错"
					}), 1);
				}
				else
				{
					if (text.IndexOf("itemprops_get_response") >= 0)
					{
						StreamWriter streamWriter2 = new StreamWriter(Application.StartupPath + "\\prop\\" + @string + ".txt", false, Encoding.UTF8);
						streamWriter2.WriteLine(text);
						streamWriter2.Close();
						this.WriteLog(string.Concat(new string[]
						{
							"开始处理类目[",
							@string,
							"|",
							string2,
							"]读取成功"
						}), 1);
					}
					else
					{
						StreamWriter streamWriter3 = new StreamWriter(Application.StartupPath + "\\prop\\" + @string + ".txt", false, Encoding.UTF8);
						streamWriter3.WriteLine(text);
						streamWriter3.Close();
						this.WriteLog(string.Concat(new string[]
						{
							"开始处理类目[",
							@string,
							"|",
							string2,
							"]读取出错....................."
						}), 1);
					}
				}
			}
			oleDbDataReader.Close();
			dataBase.Close();
			this.WriteLog("所有类目处理成功", 1);
		}
		public string cjxGetCookies(string s)
		{
			StringBuilder stringBuilder = new StringBuilder();
			string[] array = s.Split(new string[]
			{
				"\r\n"
			}, StringSplitOptions.RemoveEmptyEntries);
			string[] array2 = array;
			for (int i = 0; i < array2.Length; i++)
			{
				string text = array2[i];
				if (text.StartsWith("Set-Cookie: "))
				{
					int num = text.IndexOf(";");
					string value = text.Substring(12, num - 11);
					stringBuilder.Append(value);
				}
			}
			return stringBuilder.ToString();
		}
		public string cjxSumCookie(string n, string o)
		{
			string[] array = o.TrimEnd(new char[]
			{
				';'
			}).Split(new string[]
			{
				";"
			}, StringSplitOptions.RemoveEmptyEntries);
			string[] array2 = n.TrimEnd(new char[]
			{
				';'
			}).Split(new string[]
			{
				";"
			}, StringSplitOptions.RemoveEmptyEntries);
			string text = "";
			int i = 0;
			IL_10A:
			while (i < array.Length)
			{
				string[] array3 = array[i].Split(new string[]
				{
					"="
				}, StringSplitOptions.RemoveEmptyEntries);
				int num = 0;
				for (int j = 0; j < array2.Length; j++)
				{
					string[] array4 = array2[j].Split(new string[]
					{
						"="
					}, StringSplitOptions.RemoveEmptyEntries);
					if (array4.Length > 0 && array3[0] == array4[0])
					{
						num = 1;
						text = text + array2[j] + ";";
						array2[j] = "";
						IL_F3:
						if (num == 0)
						{
							text = text + array[i] + ";";
						}
						i++;
						goto IL_10A;
					}
				}
				//goto IL_F3;
			}
			for (int k = 0; k < array2.Length; k++)
			{
				if (array2[k].Length > 1)
				{
					text = text + array2[k] + ";";
				}
			}
			return text.TrimEnd(new char[]
			{
				';'
			});
		}
		public string cjxGetUseCookieGzip(string url, string refe, Encoding enc, ref string cookiestr)
		{
			Uri uri = new Uri(url);
			ProxySocket proxySocket = new ProxySocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
			proxySocket.ProxyType = ProxyTypes.None;
			proxySocket.Connect(uri.Host, 80);
			string text = "GET " + uri.PathAndQuery + " HTTP/1.0\r\n";
			text += "Connection: close\r\n";
			if (refe.Length > 0)
			{
				text = text + "Referer: " + refe + "\r\n";
			}
			new Random((int)DateTime.Now.Ticks);
			text += "User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)\r\n";
			text = text + "Host: " + uri.Host + "\r\n";
			if (cookiestr.Length > 1)
			{
				text = text + "Cookie: " + cookiestr + "\r\n";
			}
			text += "\r\n";
			proxySocket.Send(enc.GetBytes(text));
			string text2 = "";
			byte[] array = new byte[1024];
			int i = proxySocket.Receive(array);
			byte[] array2 = new byte[1048576];
			int num = 0;
			while (i > 0)
			{
				text2 += enc.GetString(array, 0, i);
				int j = 0;
				while (j < i)
				{
					array2[num] = array[j];
					j++;
					num++;
				}
				i = proxySocket.Receive(array);
			}
			proxySocket.Close();
			if (text2.IndexOf("Content-Encoding: gzip") >= 0 || text2.ToLower().IndexOf("content-encoding: gzip") >= 0 || text2.ToLower().IndexOf("content-encoding:gzip") >= 0)
			{
				byte[] array3 = new byte[1048576];
				for (int k = 0; k < num; k++)
				{
					if (array2[k] == 13 && array2[k + 1] == 10 && array2[k + 2] == 13 && array2[k + 3] == 10)
					{
						int l = k + 4;
						int num2 = 0;
						while (l < num)
						{
							array3[num2] = array2[l];
							l++;
							num2++;
						}
						IL_1F4:
						array2 = this.method_92(array3);
						text2 = text2.Substring(0, text2.IndexOf("\r\n\r\n") + 4) + enc.GetString(array2);
						goto IL_223;
					}
				}
				//goto IL_1F4;
			}
			IL_223:
			cookiestr = this.cjxSumCookie(this.cjxGetCookies(text2), cookiestr);
			return text2;
		}
		private byte[] method_92(byte[] byte_0)
		{
			MemoryStream stream = new MemoryStream(byte_0);
			GZipStream gZipStream = new GZipStream(stream, CompressionMode.Decompress);
			byte[] array = new byte[40960];
			long num = 0L;
			byte[] array2 = new byte[8];
			int num2;
			do
			{
				num2 = gZipStream.Read(array2, 0, 8);
				if ((long)array.Length <= num + (long)num2)
				{
					byte[] array3 = new byte[array.Length * 10];
					array.CopyTo(array3, 0);
					array = array3;
				}
				array2.CopyTo(array, num);
				num += (long)num2;
			}
			while (num2 != 0);
			byte[] array4 = new byte[num];
			Array.Copy(array, 0L, array4, 0L, num);
			return array4;
		}
		public string cjxPostUseCookie(string url, string strQuery, Encoding enc, string refe, ref string cookiestr)
		{
			Uri uri = new Uri(url);
			ProxySocket proxySocket = new ProxySocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
			proxySocket.SendTimeout = 120000;
			proxySocket.ProxyType = ProxyTypes.None;
			proxySocket.Connect(uri.Host, 80);
			string text = "POST " + uri.PathAndQuery + " HTTP/1.1\r\n";
			text += "Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*\r\n";
			if (refe.Length > 0)
			{
				text = text + "Referer: " + refe + "\r\n";
			}
			text += "Accept-Language: zh-CN\r\n";
			text += "Content-Type: application/x-www-form-urlencoded\r\n";
			text += "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n";
			text = text + "Host: " + uri.Host + "\r\n";
			object obj = text;
			text = string.Concat(new object[]
			{
				obj,
				"Content-Length: ",
				strQuery.Length,
				"\r\n"
			});
			text += "Connection: close\r\n";
			if (cookiestr.Length > 1)
			{
				text = text + "Cookie: " + cookiestr + "\r\n";
			}
			text += "\r\n";
			text = text + strQuery + "\r\n";
			proxySocket.Send(enc.GetBytes(text));
			string text2 = "";
			byte[] array = new byte[1024];
			int i = proxySocket.Receive(array);
			byte[] array2 = new byte[1048576];
			int num = 0;
			while (i > 0)
			{
				text2 += enc.GetString(array, 0, i);
				int j = 0;
				while (j < i)
				{
					array2[num] = array[j];
					j++;
					num++;
				}
				i = proxySocket.Receive(array);
			}
			if (text2.IndexOf("Content-Encoding: gzip") >= 0)
			{
				byte[] array3 = new byte[1048576];
				for (int k = 0; k < num; k++)
				{
					if (array2[k] == 13 && array2[k + 1] == 10 && array2[k + 2] == 13 && array2[k + 3] == 10)
					{
						int l = k + 4 + 6;
						int num2 = 0;
						while (l < num)
						{
							array3[num2] = array2[l];
							l++;
							num2++;
						}
						IL_22B:
						array2 = this.method_92(array3);
						text2 = text2.Substring(0, text2.IndexOf("\r\n\r\n") + 4) + enc.GetString(array2);
						goto IL_25A;
					}
				}
				//goto IL_22B;
			}
			IL_25A:
			cookiestr = this.cjxSumCookie(this.cjxGetCookies(text2), cookiestr);
			return text2;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			int num = this.txtCat.Text.ToLower().LastIndexOf(".com");
			this.txtCat.Text = this.txtCat.Text.Substring(0, num + 4) + "/?search=y";
			Thread thread = new Thread(new ThreadStart(this.method_90));
			thread.Start();
		}
		private void ckMuchSellImg_Click(object sender, EventArgs e)
		{
			if (this.ckMuchSellImg.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\MuchSellImg.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\MuchSellImg.ini"))
			{
				File.Delete(Application.StartupPath + "\\MuchSellImg.ini");
			}
		}
		private void ckLowVer_Click(object sender, EventArgs e)
		{
            //导出低于5.5助理格式
			if (this.ckLowVer.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\LowVer.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\LowVer.ini"))
			{
				File.Delete(Application.StartupPath + "\\LowVer.ini");
			}
		}
		private void ckLogin_Click(object sender, EventArgs e)
		{
			this.SaveLogin();
		}

        /// <summary>
        /// 保存阿里旺旺登陆信息
        /// </summary>
		public void SaveLogin()
		{
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			string str = "0";
            //启用登陆模式
			if (this.ckLogin.Checked)
			{
				str = "1";
			}
			oleDbCommand.CommandText = "delete from [var] where [name]='needlogin'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "insert into [var]([name],[value]) values('needlogin','" + str + "')";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "delete from [var] where [name]='login_un'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "insert into [var]([name],[value]) values('login_un','" + this.aliwwUserID.Text.Trim() + "')";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "delete from [var] where [name]='login_pwd'";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
			oleDbCommand.CommandText = "insert into [var]([name],[value]) values('login_pwd','" + this.txtPwd.Text.Trim() + "')";
			dataBase.ExecuteCmdNonQuery(oleDbCommand);
		}
		private void method_93()
		{
			DataBase dataBase = new DataBase();
			OleDbCommand oleDbCommand = new OleDbCommand();
			string text = "0";
			try
			{
				oleDbCommand.CommandText = "select [value] from [var] where [name]='needlogin'";
				text = dataBase.ExecuteCmdScalar(oleDbCommand).ToString();
			}
			catch (Exception)
			{
			}
			if (text.Equals("0"))
			{
				this.ckLogin.Checked = false;
			}
			else
			{
				this.ckLogin.Checked = true;
			}
			try
			{
				oleDbCommand.CommandText = "select [value] from [var] where [name]='login_un'";
				this.aliwwUserID.Text = dataBase.ExecuteCmdScalar(oleDbCommand).ToString();
			}
			catch (Exception)
			{
			}
			try
			{
				oleDbCommand.CommandText = "select [value] from [var] where [name]='login_pwd'";
				this.txtPwd.Text = dataBase.ExecuteCmdScalar(oleDbCommand).ToString();
			}
			catch (Exception)
			{
			}
		}
		private void wcMhojVndc_KeyUp(object sender, KeyEventArgs e)
		{
			this.SaveLogin();
		}
		private void txtPwd_KeyUp(object sender, KeyEventArgs e)
		{
			this.SaveLogin();
		}
        //private void method_94(object sender, EventArgs e)
        //{
        //    this.SaveLogin();
        //}
        //private void method_95(object sender, EventArgs e)
        //{
        //    this.SaveLogin();
        //}
		private void ckWireless_Click(object sender, EventArgs e)
		{
			try
			{
                //同时生成手机端宝贝详情（无线详情）
				if (this.ckWireless.Checked)
				{
					StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\wireless.ini", false);
					streamWriter.Close();
				}
				else
				{
					File.Delete(Application.StartupPath + "\\wireless.ini");
				}
			}
			catch (Exception)
			{
			}
		}
        /// <summary>
        /// 强制升级
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
		private void mustUpdateVersion(object sender, EventArgs e)
		{
			this.MustUpdateVersion();
		}
		private void menuItem_22_Click(object sender, EventArgs e)
		{
			this.addHost();
		}
		public void addHost()
		{
			try
			{
				string path = "C:\\Windows\\System32\\drivers\\etc\\hosts";
				StreamReader streamReader = new StreamReader(path);
				string text = streamReader.ReadToEnd();
				streamReader.Close();
				string[] array = text.Split(new char[]
				{
					'\n'
				});
				StreamWriter streamWriter = new StreamWriter(path, false);
				for (int i = 0; i < array.Length; i++)
				{
					if (array[i].ToLower().IndexOf("www917ecom") <= 0 && array[i].ToLower().IndexOf("www.917e.com") <= 0 && array[i].ToLower().IndexOf("www.91585.") <= 0 && array[i].ToLower().IndexOf("fj10086.cn") <= 0 && array[i].Trim().Length > 0)
					{
						streamWriter.WriteLine(array[i].Trim());
					}
				}
				streamWriter.WriteLine("211.149.135.72 www917ecom.gotoip3.com");
				streamWriter.WriteLine("211.149.135.72 www.917e.com");
				streamWriter.WriteLine("211.149.135.72 www.91585.com");
				streamWriter.WriteLine("211.149.135.72 www.fj10086.cn");
				streamWriter.Close();
			}
			catch (Exception)
			{
			}
		}
		public void delHost()
		{
			try
			{
				string path = "C:\\Windows\\System32\\drivers\\etc\\hosts";
				StreamReader streamReader = new StreamReader(path);
				string text = streamReader.ReadToEnd();
				streamReader.Close();
				string[] array = text.Split(new char[]
				{
					'\n'
				});
				StreamWriter streamWriter = new StreamWriter(path, false);
				for (int i = 0; i < array.Length; i++)
				{
					if (array[i].ToLower().IndexOf("www917ecom") <= 0 && array[i].ToLower().IndexOf("www.917e.com") <= 0 && array[i].ToLower().IndexOf("www.91585.") <= 0 && array[i].ToLower().IndexOf("fj10086.cn") <= 0 && array[i].Trim().Length > 0)
					{
						streamWriter.WriteLine(array[i].Trim());
					}
				}
				streamWriter.Close();
			}
			catch (Exception)
			{
			}
		}
		private void menuItem_23_Click(object sender, EventArgs e)
		{
			this.delHost();
		}
		private void ckNoPromote_Click(object sender, EventArgs e)
		{
			if (this.ckNoPromote.Checked)
			{
				StreamWriter streamWriter = new StreamWriter(Application.StartupPath + "\\NoPromote.ini", false);
				streamWriter.Close();
				return;
			}
			if (File.Exists(Application.StartupPath + "\\NoPromote.ini"))
			{
				File.Delete(Application.StartupPath + "\\NoPromote.ini");
			}
		}
	}
}
